Activity Forums Salesforce® Discussions When we use addMessage and addError?

  • Sudhir

    Member
    July 5, 2017 at 9:26 am

    When you wanted to display some custom messages to the current VF page context using some validation logic in controller, you use addMessage. Using this, you can show different Severity level (CONFIRM, ERROR, FATAL, INFO, WARNING) message.

    If you wanted to prevent some DML operation under trigger context and display some custom error message, you use addError on a record or a field.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos