-
How to display error messages in Salesforce Visualforce Page?
How to display error messages in Salesforce Visualforce Page?
Log In to reply.
Activity › Forums › Salesforce® Discussions › How to display error messages in Salesforce Visualforce Page?
How to display error messages in Salesforce Visualforce Page?
Apexpages.addMessage( new ApexPages.Message (ApexPages.Severity.ERROR, ‘Required fields are missing. ‘));
in Visualforce page add below tag where you want to display the error message.
<apex:pageMessages ></apex:pageMessages>
Insert the below tag inside the visualforce page within page block
<apex:pageMessages ></apex:pageMessages>
Hope it helps.
Log In to reply.