0

In Communities, I'm getting a generic error message(An error occurred while trying to update the record.Please try again) instead of my custom error message. Can some one please help me, if there is any setting I missed for communities in Salesforce?

Explanation: - I have a trigger on user object where I'm checking user's Email domain should contain account's domain(have a custom field on account object it will have domain value) if not I want to throw an error message. But instead of my custom message, I'm getting generic one. Please suggest a fix to it.

Note: - It's working as excepted if I login directly into salesforce.

1

There is one custom generic Exception page where you will find these lines

<apex:outputText styleClass="title" value="{!$Label.site.error}">
     <apex:param value="{!$Site.ErrorMessage}"/>
      <!-- this parameter needs to be italic in the site.error label -->
</apex:outputText>

Just replace the ErrorMessage with ErrorDescription and you will get actual error message. After fix revert back to generic message.

<apex:outputText styleClass="title" value="{!$Label.site.error}">
     <apex:param value="{!$Site.ErrorDescription}"/>
     <!-- this parameter needs to be italic in the site.error label -->
</apex:outputText>
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.