You need to sign in to do that
Don't have an account?
trublu
Message Edited by trublu on 07-14-2008 06:13 PM
API to recall approval request
Does anyone know the API for recalling approval request ?
I have setup Approval process in Salesforce. I would like to recall an existing approval request through API instead of logging into Salesforce and clicking Recall Approval Request button.
I tried looking into process, but it doesnt say one can RECALL an approval. Since we can recall thru the UI, there should probably be a way to do it thru the API?
Thanks a lot.
Message Edited by trublu on 07-14-2008 06:13 PM
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_process_example.htm
So like:
Thank you for your response.
My question with this approach is that the Approval object only represents the approval request for a Contract.
That's a good news....
So the description about Approval in the API is incorrect then? Please confirm. I appreciate it!!!
http://www.salesforce.com/us/developer/docs/api/index.htm
http://www.salesforce.com/us/developer/docs/apexcode/index.htm
werewolf,
"It's the same process for any object, you just have to setObjectId on the Approval.ProcessSubmitRequest."
Actually, ProcessSubmitRequest is for submitting objects to the approval process, right? Then how about ProcessWorkitemRequest? How do I get the workitemids associated with a parent object (e.g. Opportunity)?
Thank you.
====================================
ProcessWorkitemRequest Arguments
werewolf,
I am sorry that I missed the following link that you provided:
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_process_example.htm
Message Edited by trublu on 07-16-2008 07:44 PM
Message Edited by trublu on 07-16-2008 07:55 PM
Select p.Id, p.ProcessInstanceId, p.ProcessInstance.TargetObjectId from ProcessInstanceWorkitem p where p.ProcessInstance.TargetObjectId = <my id>
Then you can create an Approval.ProcessWorkitemRequest object, call setWorkitemId on it to the ID you just got from that query, and now you're golden, you can do with it as you please.
werewolf,
Just read your latest response... so I need to use sql to actually retrieve the workitemids from the table?
Thank you very much!!!!!!
Message Edited by trublu on 07-16-2008 08:13 PM