function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
JestonJeston 

Approval flow - assign dynamic approvers

I created multiple custom hierarchy fields in the user object for dynamic approvers configuration. When working on the approval steps > select assigned approvers, the 2nd option should be "Automatically assign an approver using a standard or custom hierarchy field" to select the custom hierarchy fields. However, it only gives the option "Automatically assign using the user field selected earlier. (Manager)". There is no option to select the custom hierarchy field.

Is this a special SFDC feature to be enabled by the support team, or am I missing something? Please help!

* This is the SFDC help page of selecting the approver: https://help.salesforce.com/articleView?id=approvals_step_approver.htm&type=5
 
AnudeepAnudeep (Salesforce Developers) 
Basically there are four options as defined in the documentation

I have checked the settings and as per the standard article the requested option comes when the user is setting up the approval process.

"Automatically assign an approver using a standard or custom hierarchy field."
Assigns the approval request to the user in the field displayed next to this option. You select this field when you configure the approval process.
 
Steps to be followed are - 
  • Create a new approval process
  • Go to setup and type approval process
  • Click on create new approval process
  • Select Jump Start Wizard
  • Fill all the required information and at the bottom you will find "Select Approver"
The required option "Automatically assign an approver using a standard or custom hierarchy field" would be visible and could be used

I have seen the option specified in few older posts. I recommend creating a support case

https://patlatus.wordpress.com/2015/08/16/who-can-be-approvers-in-approval-process-in-salesforce/

https://salesforce.stackexchange.com/questions/103466/why-only-one-hierarchy-field-on-user-object-can-be-used-as-an-approver-this-res

Let me know if this post helps
AnudeepAnudeep (Salesforce Developers) 
I also recommend checking this post once
JestonJeston
Hi Anudeep, thanks for your suggestion! It works when creating the top level approval process, not on Approval Steps. When creating each process step, it limits to "Automatically assign using the user field selected earlier. (Approver1)" without the option to select another custom hierarchy field.

In my case, each user has up to 4 approvers which I created 4 approvers custom hierarchy fields in the user object.  For each approval step, I want to select a different custom hierarchy field (dynamic approvers depending on the user), but the system does not give the option to select another custom hierarchy field in the steps.

In SFDC document https://help.salesforce.com/articleView?id=approvals_step_approver.htm&type=5, it says "Identify Assigned Approvers for an Approval Step". Is that wrong information or I misunderstood it? Please advise. 
JestonJeston
I also created a Salesforce support case for this issue last week. They called me today confirmed that this feature isn't available for the approval process steps yet. 

I tried a different way to solve this dynamic approval challenge which works for me. It just takes a few more steps to make it work.
Workaround solution
1. Create custom hierarchy fields in user object for the dynamic approval process
2. Create correspondent lookup fields (lookup to user object) in the object which the approval process is to apply
3. Use Process Builder to create a new process to copy the user's hierarch field values to the correspondent approval process object's lookup fields - whenever a record is created or updated (set field reference as the screenshot below). 
4. In approval process steps > select approver > Automatically assign to approver(s) > related user > select the custom lookup field. 

Set field reference