// 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 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!!