1

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.

1 Answer 1

1

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.

7
  • But I don't think it will run a field update after each approval of a multi-approver stage, will it ? I think it waits until the final approver of the stage has approved - and then it runs the actions associate with approval in the stage.
    – Zoom_v
    Jul 20, 2017 at 21:41
  • did you try that? Salesforce has given the functionality to define approval/rejection actions in each step Jul 20, 2017 at 21:44
  • see my answer with justifications and how it will work for you Jul 20, 2017 at 22:06
  • I am trying to do all of this within the SAME step. My step requires approvals by both users before advancing to the next step. And I want the Status field to update after the first one approves. It will not advance to the next step at that point. It will still be waiting for the 2nd approval. I don't think I can get it to do a field update at the moment of the first approval of the step because I do not believe Approval Actions of a step are conducted until it receives the last required approval of that step.
    – Zoom_v
    Jul 21, 2017 at 19:30
  • based on the requirement, if you need to change the design, you can do that. What can be achievable I have shown working on my DE Jul 21, 2017 at 20:06

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.