The Approval process is very easy, only one step. The one step is now assigned to a queue.

Now, the business requirement changes. Let's get rid of the queue.

We still have a group of people as approvers. Say, we have two people. When the approval task comes, it will be assigned to the first person.

Then, when the next approval task comes, the system will examine the number of approval tasks for the two people.

Now, the first person has one task and the second person has zero task, so the new task will be assigned to the second person.

The above is the business requirement on the approval process.

My question is, how do I make this happen?

Salesforce provides Automatically assign to approver(s). and add row for the process. However, I do not think this automation works like the scenario I said above. Also, if I can use code to control this, that will be fine. Just do not know whether this is possible under the current functionality provided by Salesforce.


Short answer to this is "Needs some code and not possible out of box".

The problem here is your business scenario involves an algorithm where you need to check the database of SFDC and then decide the approver .With apex code you have that ability to query back the data base and write if and else statements as per business rule .

You may have to roll your own logic with custom approval process

The custom approval provides method in apex .Take a look at methods in Approval Namespace class

This provides you ability to the SetNextApproverId and Submit request .

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.