Skip to main content The Trailblazer Community will be unavailable from 2/1/2025 to 2/2/2025. Please plan your activities accordingly.
Hi there,

I am trying without success to add an error message to a Standard Contact details page. Is it possible? I have read a few topics which say you can't, others are using webservices or javascript code, but it is not clear to me if it is possible or not.

My context is this: I have a custom button in a Contact details page. What I want to do is to call apex code when pressing that button, which will do some operations (not validation, will actually call external webservices) and I wanted to add either a Success or Error message in the same Contact's page, not to redirect to some other visualforce page or something like that. Sounds pretty simple but my calls do ApexPages.addMessage or contact.addError are not adding anything in the Contact page.

Any help is appreciated.

Thank you in advance.
5 answers
  1. Mar 9, 2016, 8:53 AM
    Hey Mauricio,

    You can create a visualforce page and place it as an inline VF page on the contact page layout. This VF page will be used to display the outcome of your webservice call. Create a page block section in VF page which will be rendered based on a boolean variable. Control the value of the boolean variable in your code where your are calling the webservice. Hope this helps.
Loading
0/9000