• Lalith Bachimanchi
  • -1 Points
  • Member since 2016

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 1

I have refered below link to submit a record for approval.

I am using REST API to submit a record for approval. When I submit a record, instead of submitting a record for approval, it is being approved.
Even though the approval process has two steps, when I make a REST call with non-admin to just submit a record, the response shows that record is approved. When I check in Salesforce UI, record is approved and Field Update and Email Alert has also fired. 

Below is the request and Response:
POST https://instance//services/data/v44.0/process/approvals
"requests" : [{
"comments":"submitted for approval 1 nov",
"processDefinitionNameOrId" : "US_Account_Approval_Process"}]

        "actorIds": null,
        "entityId": "a2k2D000000e03aQAA",
        "errors": null,
        "instanceId": "04g2D00000073vXQAQ",
        "instanceStatus": "Approved",
        "newWorkitemIds": [],
        "success": true

Please let me know why it is behaving this way? Is it a defect in Salesforce API?

Hi all,


Starting this morning we have gotten several locking errors with the message from the title. This error occurs when saving new Case records using the SOAP service, and we have seen them in two different applications which use the service. The code for the operations has not changed significantly in months. Any clues? I've seen in other posts that this "just happens" from time to time. Is there any way to stabilize it?