• Sagar7990
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

Hi All,

 

I want to create a approval process and assign some specific users to that approval process in apex class. I tried as follows;

 

Approval.ProcessSubmitRequest req1 = new Approval.ProcessSubmitRequest();
req1.setComments('Submitting request for approval.');
req1.setObjectId(newDPCD.id);
req1.setNextApproverIds(idList); //idList is a list of contact ids

 

But It didn't work. The main issue is I want to assign specific users dynamically.

 

Is there any work around? If someone have any idea or sample code please share it.

 

Thanks in Advance