Lock Record

Salesforce Approvals are a great feature that allow you to be able to track approvals and lock records from having any changes after approvals. Sometimes, however, an Approval Process doesn’t fit into the situation that you’re trying to create. You know how to create a custom approval process to achieve the process part of it, but since you’re not using the standard Salesforce Approval Process, you can’t lock the record.

With the Lock Record Apex Action, you can now lock that record.

Use the Lock Record Apex Action with Process Builder to automatically lock a record based on something like, the status going to Approved.

Additionally, you can use Flow and the Apex Actions in Flow to lock a record.

A simple Flow will allow you to lock a record, or add your custom logic to lock the record only after it has gone through a custom approval.

NOTE: Unlike the Unlock Record Apex Action, any user who has edit rights on a record will be able to lock the record. This means that you can lock a record from a Flow button without having to use Process Builder.

2 comments

    1. Hi Ben,

      It should still work in flow builder in debug. You need to ensure that the debug has a way to get the record id that you’re trying to lock or unlock, but as long as you send the Apex Action for lock record (or unlock, if you’re using that), then it should work in debug mode. It does run with user rights, so ensure you have read/write rights on the record.

      Rich

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: