I am in Winter '16 and trying to unlock and lock a record in APEX and I am getting the following exception

FATAL_ERROR System.UnexpectedException: Apex approval lock/unlock api preference not enabled.

Does anyone know what is the problem?

1 Answer 1


You need to go to

Setup -> Process Automation -> Process Automation Settings

(if you use Classic interface -

Setup->Create-> Workflows and Approvals -> Process Automation Settings)

and set checkbox Enable record locking and unlocking in Apex as true

enter image description here More information here.

You must log in to answer this question.

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