Posts

Showing posts with the label Recordlocked

Salesforce Fact #848 | Trigger validation on locked records

Image
Suppose we want to put a validation that if an account record is locked, we cannot create any related record for example Contact. Attached is a sample trigger code:

Salesforce Fact #607 | LWC show toast record is locked

Image
Records can be locked in Salesforce due to various reasons like Approval process or from apex code. We can create an LWC component to show a visual indicator to the user that the record is locked so that he/she gets aware before making any update in the record. Attached are the screenshots.