+ Start a Discussion

I want to show error message in customer portal using trigger

using adderror methods , error message is not shown.in 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