You need to sign in to do that
Don't have an account?
SF DEV
How to catch and display error message from trigger
using '' try catch'' i want to display the error message from the catch(exception e) code on to the layout when trigger gets fired.
How to show the error message on layout??
correct, in catch, you will need to write like
trigger.new[0].addError('something wrong etc.');
All Answers
user addError().
Refer to this post: http://boards.developerforce.com/t5/Apex-Code-Development/Salesforce-trigger-addError-method/td-p/310045
I want to display error from
catch(exception e)
{
adderror(e)
}
like this !!!
correct, in catch, you will need to write like
trigger.new[0].addError('something wrong etc.');