// Insert an account

Account a = new Account(Name='Test',

insert a;

// Create an approval request for the account
Approval.ProcessSubmitRequest req1 = 
      new Approval.ProcessSubmitRequest();
req1.setNextApproverIds(new Id[] {'***************'});
// Submit the approval request for the account
Approval.ProcessResult result = 

Am trying to execute this code in anonymous block. How ever when tried in trigger i got same error all the time. Hard coded next approvers ID. No luck.

Any suggestions on what am I doing wrong ? Please help!!

  • 1
    I have one more doubt on this. to execute this or run approval via Apex should i have a approval process defined on Account in prior ? because once i define a approval process this error disappears.
    – Soberano
    Sep 4, 2013 at 12:32
  • 1
    Yes, the approval process must exist in your system. Check out my answer for more details. Sep 4, 2013 at 13:34

6 Answers 6


Is there a chance you created the approval process but don't have it activated? Does your account meet the entry criteria for your approval process? This error is thrown when an object is attempted to be submitted for approval and no approval process can be found, either because it isn't activated or your object doesn't meet the entry criteria.

You can not just instantiate this code. There must already be an approval process in the system for you to be able to run this code.

  • I was actually trying to have an approval process with more than 15 steps. I got to know what exactly error meant . And also now I am able to chain the Approval processes and get away with the limitation of 15 steps. Thank you people . thank you @Jesse Altman.
    – Soberano
    Sep 4, 2013 at 14:34

I think there is a problem with profile permissions. Try with this code:

Account acc1 = new Account(Name='acc1');
        insert acc1

        if([select count() from ProcessInstance where targetobjectid=:acc1.id] < 1)
            Approval.ProcessSubmitRequest req = new Approval.ProcessSubmitRequest();
            req.setNextApproverIds(new Id[] {UserInfo.getUserId()});

            //Submit the approval request
            Approval.ProcessResult result = Approval.process(req);

  • No luck. And also i am the system admin and have "Modify all data " permission. Am wondering what is the meaning of error and why is it throwing the error on Approval.process(); line.
    – Soberano
    Sep 4, 2013 at 11:18

Anyone who runs into this problem, this might help: Your record that is submitted to approval do not have correct sharing settings. The submitter might have read access to the record but not access to lock the record, hence the submit to approval is failing.


There May be a few reasons:

  1. Approval Process Maybe deActivated.
  2. Approver may be inActive
  3. Approver may not be in initial Submitter role,..etc.

Hope it helps.


Go to Approval Process edit it and add record creator as initial submitter under allowed initial submitters.

Hope it helps


I was having the similar issue, and found that the submitter also needs to be added to the Initial Submitter list in the approval process settings.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .