[SalesForce] Approval Process step requiring multiple approvers

I have a multi-step Approval Process with a step which will require approvals from multiple individuals in order to advance to Final Approval. I have a Status field on the record. I would like for that field to be updated to say "Approved By User A" or "Approved By User B" upon approval from the appropriate user. And then after the second person approves it the Status will say "Approved By Both".

However, I don't know how to update the field to indicate this because I don't know how to work this type of logic into a single step. Since I have two fields which have the names of the approvers (ApproverA__c ; ApproverB__c). Then I thought I'd be able to check the $User.id and compare to the two fields, and then set the Status as such ("Approved By User B" etc).

However, I don't think Field Updates are triggered until the final approval in a stage. Every time I run the approval process it doesn't get triggered until the last approval.

Any ideas ?

Thank you.

Best Answer

Approach actions can be performed at each steps.

In the approval step, click on Show Actions link to expand that.

Step wise approvals

So, you will define workflow field updates ("Approved By User A" or "Approved By User B") in each steps and in the final approval action update that as "Approved By Both".

Approach:

Define approval process as specific above

define

Results:

After first step approval, see that "Approval User A" value in the field which is getting updated from Step1 field update.

step 1

After 2nd step approval, see that "Approved by Both" value in the field which is getting updated from Step 2 field update.

step 2

Update based on comments

Approval action only triggers when both of Unanimous approvers will approve the record in a single step. Workaround could be you need to write batch process to update the record. So when you submit for approval you will initiate batch process in a specific interval and update the record upon unlocking and re-lock again and finally after completion of approval you will terminate the job.