function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

I want to show error message in customer portal using trigger

using adderror methods , error message is not customer portal. i want to show error message in same page itself. it is standard page. how i used? please give me the solution


I have used these in Apex class to validate the form on customer portal,


System.debug('DOCUMENT IS MISSING');


ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.FATAL, 'Please ensure a file has been selected before saving.'));


Hope this helps.



I want the  code in trigger not a class