Hi is there any way to fetch all the opportunity records which are in the locked state due to the approval process and as an administrator I want to unlock all the records at a time.

1 Answer 1


Assuming that this is a one-time activity you are trying to do, I would recommend you write a batch apex code and make use of the Approval Class methods mentioned here. You can use the isLocked and unlock methods. Before you execute this code, check if you have enabled Enable record locking and unlocking in Apex under Settings > Process Automation > Process Automation Settings.

Also refer this for some more information.

This site is temporarily in read-only mode and not accepting new answers.

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