function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Validation rule when a record is in edit mode?



I want to write a validation which will be active only when a record is being edit - but not active/triggered when record is being created. How can I achieve this?


Thanks for you help.

Best Answer chosen by Admin (Salesforce Developers) 

The validation rule will initiate when the record is saved. If the rule evalutes to true, the save is prevented and the user stays on the edit screen (the record is not created).