Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Salesforce
  3. Question
Salesforce

What to do when I receive - no applicable approval process was found?

Asked by Aalap Prabhakaran Apr 28, 2023 2.5K views 1 answer
Share

About this question

// Insert an account Account a = new Account(Name='Test', annualRevenue=100.0); insert a; // Create an approval request for the account Approval.ProcessSubmitRequest req1 = new Approval.ProcessSubmitRequest(); req1.setObjectId(a.id); req1.setNextApproverIds(new Id[] {'***************'}); // Submit the approval request for the account Approval.ProcessResult result = Approval.process(req1);

Am trying to execute this code in an anonymous block. However when I tried to trigger it I got the same error all the time. Hard coded next approvers ID. No luck.

Any suggestions on what I am doing wrong ?

Your answer

1 Answer

More Salesforce discussions