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
Ronak PatelRonak Patel 

Override Standard Validation message

How  we can override  the message provided by the required validation in Page Layout for Required field?

Best Answer chosen by Admin (Salesforce Developers) 
LakshmanLakshman

You can do one thing like go to the Field where you want to override the standard error.

Edit it, uncheck Required under General Options and then add up a validation rule as below:

 

Lets say your field name is RequiredCustField__c, so the validation would be like:

Rule NameCannot_be_NullActiveChecked
Error Condition FormulaISBLANK(RequiredCustField__c)
Error MessageRequiredCustField is must before you may proceed to save!Error LocationRequiredCustField(s)
Description 

 

Let me know if it works for you.

 

Regards,

Lakshman

All Answers

Navatar_DbSupNavatar_DbSup

Hi,


I don’t think you can overwrite the standard validation error on Standard Page. But if you are creating your custom page for that then you can do this. For custom validation you can go to that validation rule and change that error message.

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 

LakshmanLakshman

You can do one thing like go to the Field where you want to override the standard error.

Edit it, uncheck Required under General Options and then add up a validation rule as below:

 

Lets say your field name is RequiredCustField__c, so the validation would be like:

Rule NameCannot_be_NullActiveChecked
Error Condition FormulaISBLANK(RequiredCustField__c)
Error MessageRequiredCustField is must before you may proceed to save!Error LocationRequiredCustField(s)
Description 

 

Let me know if it works for you.

 

Regards,

Lakshman

This was selected as the best answer