function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
PJayaPJaya 

Getting Entity Locked error in Test method Approval Process

Hi, Can anyone post a sample code for executing the test method for approval Process.My actual requirement is Whenever a record is created and a particular field is updated it goes for the manager approval.So first i want to create a record and i should unlock the record from approval process and then edit it. Mainly i need the code to achieve the approval process where the record should be approved in the test method. Thanks in Advance!!
littledevillittledevil

Hi,

 

Check this sample code. this should give you a hint.

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_process_example.htm