[SalesForce] display an error message on Page Layouts How can I display an error message in a Page Layout, not in Visualforce? Best Answer If you want to do it through triggers: - https://help.salesforce.com/apex/HTViewSolution?id=000176551&language=en_US If you want to do it through validation rules - http://www.salesforce.com/us/developer/docs/workbook/Content/validation_2.htm Related Solutions[SalesForce] Displaying error message from Apex Code You can display error messages using the addError method on sobject or its fields. Salesforce docs on the sobject instance addError method: https://developer.salesforce.com/docs/atlas.en-us.198.0.apexcode.meta/apexcode/apex_methods_system_sobject.htm#apex_System_SObject_addError More info on exception handling: http://wiki.developerforce.com/page/An_Introduction_to_Exception_Handling [SalesForce] Required Error Message in Visualforce Page http://www.sfdcpoint.com/salesforce/show-error-message-visualforce-page/ I hope this will help you for sure Related Topic[SalesForce] Inline VisualForce page not display in Edit[SalesForce] Error Message Display from Custom VisualForce Button without JavaScript[SalesForce] Displaying an error message on a visualforce page
Best Answer
If you want to do it through triggers: - https://help.salesforce.com/apex/HTViewSolution?id=000176551&language=en_US If you want to do it through validation rules - http://www.salesforce.com/us/developer/docs/workbook/Content/validation_2.htm