You need to sign in to do that
Don't have an account?
scottrm
how to creat eand authorise approval request in apex when logged in as a user with lower privileges
I have some code based on this example there http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_process_example.htm which creates and approves an approval request. It works fine if I am logged in as sysamdin but if a user with lower privilges is logged in I get an error on the line
Approval.ProcessResult result2 = Approval.process(req2);
The error message is
First exception on row 0; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY,
Is there any way to make this code work for a user with lower privileges?
Fast thought: did you specify "with sharing" on your class definition? Best, Steve.
Yes with sharing was specified