Being able to lock and unlock records is very helpful for ensuring data integrity. In Salesforce Classic, there used to be a lock icon to let you know when a record was locked.
This hasn’t made it over to Lightning as of yet. As a result, you can use the Locked Record Notifier to let Users know that the record is locked and in addition, you can use your own note.
Simply go to Lightning App Builder, select the Locked Record Notifier, drag it to where you would like it to show, and enter some text. If the record is unlocked during the Lightning App Builder Page edit, you’ll see it blank, like below, as the Locked Record Notifier will not show unless a record is locked.
If the record is locked during the Lightning App Builder Page edit, you’ll be able to see the preview.
The component will automatically show if the record is locked and will not show if the record is unlocked. This is a great way to let your users know a record is locked, and give them additional information if needed!
I was getting ready to write something like this and found yours. Question, in some of the screenshots of the lightning component, I see the actual lock symbol, but I don’t see an option to show this in the component. Is there any way to have the lock icon symbol show?
The lock symbol is just an emoji, you can copy and paste it in! 🔒
Do we have to assign any specific access to apex for the lock to appear? It does not seem to show up for us
There is an apex class, lockRecord. If you share that, I think that should work. Let me know if that fixes it!
assigning access to lockRecord apex class did NOT seem to work.
Did you install for all users or just system admin?
Installed for all Users, still the same issue.
No message displaying for Locked Record Notifier when I add the component to a record page. I installed for all users. Record IS locked (shows padlock in classic). What have I missed?
That should be it. Do you have filters on the lightning component that could be preventing it from displaying or a different lightning page layout that is set for the profile/app? Also, do you have “Enable record locking and unlocking in Apex” set to true in Process Automation Settings in setup?
Enable record locking and unlocking in Apex was the one, thanks Rich!