Customize error message for trigger and display error message below
the field
This Post demonstrates how to display error message in particular
field level.
SObject SomeRecord;
SomeRecord.SomeField__c.addError('Custom Message');
//or
SomeRecord.someField__c.addError(someException);
Note:
We cannot add it to a field dynamically. This error mapping can only be done with a hard-coded field.
Useful Links:
https://salesforce.stackexchange.com/questions/79291/how-to-use-adderror-with-a-dynamically-derived-field-name
No comments:
Post a Comment