I want to display error message when a particular field is changed on case record page in lightning (this is standard page and not a custom lightning component) and user clicks on save.

Error message needs to have multiple lines and hence cannot be achieved using addError(error message,escape); as lightning does not support HTML tags.(I have already this option and it didn't work). I cannot use validation rule since logic behind displaying error message is a complex one.

Is it possible to handle any events on standard case page layout that gets fired on when user clicks save button and then compare on old and new value of an edited field and then perform a server call, so that I can display a message/toast and interrupt the DML execution.

  • No. You're going to have to deal with not having line breaks. – sfdcfox Apr 2 at 17:22

Your Answer

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

Browse other questions tagged or ask your own question.