You need to sign in to do that
Don't have an account?
vamsi krishna 106
No applicable approval process was found
Hey guys,
I am getting this error "No applicable approval process was found"
Here my code
Approval.ProcessSubmitRequest req1 = new Approval.ProcessSubmitRequest();
req1.setComments('Submitting request for approval.');
req1.setObjectId(consignment.id);
req1.setProcessDefinitionNameOrId('PTO_Request_Process');
req1.setSkipEntryCriteria(true);
system.debug('new approve'+req1);
Approval.ProcessResult result = Approval.process(req1);
please help me guys..
Thanks
Vamsikrishna
The information that you are showing is not enough to understand the problem. To understand the problem you also need to post the approval process for the object. From the information that I see, I think that you are sending the record to approve but there is no rule in the approval that meets any approval criteria.
Please se the link below:
http://salesforce.stackexchange.com/questions/112432/error-while-running-a-test-class-no-applicable-process-no-applicable-approval-p
Is a similar problem.
I hope that this information help you.
Best Regards
António Luzio