You need to sign in to do that
Don't have an account?

Break tag in Add Error Method for Trigger?
Hi All,
I am using addError method in a trigger to show some error messages. I need to show the error message in two different lines, like below
***DO NOT ISSUE THIS ORDER***
***The order is currently with the DEV team***
I am unable to add the break between the lines. I tried the below:
AMet[0].addError('***DO NOT ISSUE THIS ORDER***'+BR()+'***The order is currently with the DEV team***');
But it says, there is no BR() method.
Help!!!
Thanks,
community
Finally, this worked!
String sBreak = '</br>';
AMet[0].addError('***DO NOT ISSUE THIS ORDER***'+sBreak+'***The order is currently with the DEV team***');
All Answers
Finally, this worked!
String sBreak = '</br>';
AMet[0].addError('***DO NOT ISSUE THIS ORDER***'+sBreak+'***The order is currently with the DEV team***');
Ex : tt.addError('<span><b>Enter time in format</b></br><b>HH:MM:SS</b></span>',false);
thanks for the post its working perfectly , it will be very usefull to everyone, who ever wants to use break in trigger or apex class
tt.addError('<span><b>Enter time in format</b></br><b>HH:MM:SS</b></span>',false);
the above code is working fine in classic but in lightining its not working,kindly provide me the solution
Thanks