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

Parallel Approval

I have apex code that works on kicking off an approval process based on numbers that I have defined.  However, sometimes the approval may need to be routed to more than one person when it is kicked off.  I can't get it to work in sending the approval to more than one person. 


Here is the code...don't know what is wrong.  It should work becasue setNextApproverIds accepts a list.

                   //list of ids that need to be sent the approval request

                    List<String> approversID = new List<String>();

                   //create the new approval request to submit    
                    Approval.ProcessSubmitRequest req = new Approval.ProcessSubmitRequest();
                    //set approvers
                    req.setComments('Submitted for approval. Please approve.');
                    // submit the approval request for processi