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
vibrationvibration 

How to show trigger error message in customer portal?

i used adderror in trigger  ,it is not displayed incustomer portal. I want to show  error message in  customerportal..plz send it..............

Navatar_DbSupNavatar_DbSup

Hi,

 

I have created the following trigger in system admin profile on a custom object. trigger works fine in the customer portal and also print the error .

 

trigger checkbeforeinsert on chekforcustoobject__c (before insert)
 {
    chekforcustoobject__c  cc=trigger.new[0];
    if(cc.name=='ankit')
    {
        cc.name.addError('you can insert this name');
    }
}

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.