All Ideas

Idea Details

Post an Idea
290  Points
Open
Idea has been posted. Give it an upvote or downvote.

Custom VisualForce Pages for Error Display

Apex & Visualforce

Currently error display in Salesforce on standard pages must be done either as plain text or as embedding HTML within the error itself.  However, using HTML in the error messages is not fully supported throughout Salesforce and makes for difficult to parse errors when received via the Web Service API rather than the main UI.  

If it were possible to specify an inline VisualForce Page or component to handle display of errors, this would allow developers to use nicely formatted errors, with additional functionality while separating the display of the error from the actual error itself.  There are several reasons why HTML/VF errors would be useful:
  • Linking to documentation
  • Allow the VF component/page to record the error message in a logging object
  • Link to other records within salesforce
This could be done with some simple modification to the current addError() method:

sObject.addError( PageReference page, String errorText, Integer optionalWidth, Integer optionalHeight );

The the error is returned during a non-UI call, only the errorText is returned.  Otherwise an inline VisualForce page is displayed instead of a plain-text or HTML error message.

Merge Idea · Flag

Latest Comment from Salesforce

  • IdeaExchange Moderator - 4 years ago

    With the Summer 15 release, We support overriding standard error pages with Visualforce pages in communities only.  For more information, please see the release notes:

    http://releasenotes.docs.salesforce.com/en-us/summer15/release-notes/rn_networks_community_management_custom_vf_error_pages.htm​
  • Upvotes
  • Downvotes

Ideas

Apps

from AppExchange

Questions

Help us to keep IdeaExchange clean by pointing out overlapping ideas. We'll investigate your suggestion and merge the ideas if it makes sense.



 

 

Thanks for your merge suggestion. We will review it shortly and merge the ideas if applicable.

Salesforce takes abuse situations very seriously. Examples of abuse include but are not limited to posting of offensive language or fraudulent statements. To help us process your request as quickly as possible, please fill out the form below describing the situation. For privacy and security reasons, the final outcome of an abuse case may not be revealed to the person who reported it.


 

Thank you for your feedback. We take abuse seriously and will investigate this issue and take appropriate action.