List of the ApexPages.Severity

List of the ApexPages.Severity enum values are:

  • CONFIRM
  • ERROR
  • FATAL
  • INFO
  • WARNING

For more help on this topic check out the documentation.

in the Apex Class can be used like this:

ApexPages.Message myMsg = new ApexPages.Message(ApexPages.severity, summary);
ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.FATAL, 'my error message');

Written by 

Salesforce MVP | Lightning Champion | 16x Salesforce Certified | Application Architect | 6x Trailhead Ranger | Techforce Services | Australia

Leave a Reply

Your email address will not be published. Required fields are marked *

*