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
NandiniNandini 

How to error message in helper class

Hi Team,

I have created trigger for Rolllup summary from child to Parent using helper classes.
How can we show the error message to user, if the parent object is not updated from child object.
Please let me know.

Thanks,
Nandu.

 
Best Answer chosen by Nandini
Raj VakatiRaj Vakati
You can use the 
.AddError method 
 
Trigger.new[0].addError('bad');