0

I've been asked by someone to recall a lead approval request via the API (soap). I've been able to submit a lead for an approval via the API by calling the process method, and it appears from the documentation that I can do the same for recalling the approval, but I'm not sure I'm understanding how I need to do this. I'm getting errors that are not even related to the process (ie.INVALID_OPERATION) so I'm doing something wrong.

This is my SOAP body: <process xmlns="urn:partner.soap.sforce.com"> <actions xsi:type="urn:ProcessWorkitemRequest"> <action>Remove</action> <workitemId>04a1100000006URAAY</workitemId> </actions> </process>

where the workitemID is the ProcessDefinitionId from processInstance where TargetObjectId is my lead ID.

However, I'm getting the following response:

<processResponse> <result> <entityId nil="true" /> <errors> <message>Illegal transition type</message> <statusCode>INVALID_OPERATION</statusCode> </errors> <instanceId nil="true" /> <instanceStatus nil="true" /> <success>false</success> </result> </processResponse>

Any help would be appreciated. Thanks in advance.

0

I found out what the problem was. It was because I had set action as 'Remove' rather than 'Removed'.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.