You need to sign in to do that
Don't have an account?
ExpertNOT
Approve a submitted record using Flow
Hi, Flow supports submitting a record for approval. I am trying to use flow to Approve and existing record in the approval process waiting to be approved. Any ideas. I see that you can up date a Process WorkItem in a flow but not the Process instance were the status is located. Di I have to write an Apex Class to change the processInstance Status to Approved and use it in the Flow? I want to use a Flow as I have a collection of Records that are waiting for approval and use Flow to execute the approvals on the collection.
Please use below link.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_process_example.htm
Thanks,
Gaurav
All Answers
Hi Marty,
Yes, automate approving of aproval process can be possible with below situations:
1. Automate approval can only be possible through Apex.
2. We cannot use runAs() method within apex, i.e. system admin will be the user who will approve the user or the person who is approving it.
3. We need some criteria based on which we need automate approving process.
Hope this information would be helpfull, let me know if you need more insight on this.
Thanks,
Gaurav
Email: gauravgarg.nmims@gmail.com
OK I need to develop APEX along with my flow. I am thinking of developing an APEX Class using InvocableMethod, A flow can find the Process Instance and ProcessworkItem and I will have the TargetObjectID as well as the User ID in the flow. So all I need to do is figure out how to write an APEX Class as an InvocableMethod to approve .
Please use below link.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_process_example.htm
Thanks,
Gaurav