2

I need to display multiple line messages error message when user updates a field Asset code on case record in lightning environment.

I tried with trigger.addError('Error line 1 <br/>' + 'Error line2', false) in apex class. It works in classic but html tags are not supported in Lightning.

Is there any way to display message/toast to display error message only when Asset code gets changed on case record detail page .

  • Did you try new line character \n? – Anita Bhanarkar Apr 2 at 8:03
  • It doesn't work since `\n' is a html tag which is not supported in lightning – devforce Apr 2 at 8:08
0

Are you using a custom component or is it a standard lightning page ? If custom component, you could send the error message as a map and render it using showToast event / ui:message component.

  • It's a standard lightning page, not a custom lightning component. – devforce Apr 3 at 11:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.