Our tech support team uses cases for interacting with customers. Based on some criteria on the parent account, we are looking for a way to show a message to our tech support team indicating that this account is special.

I could go down the route of adding new fields, formulas and workflows; My hesitation is that the data already exists so this would result in duplicate data simply to meet this requirement.

I'm comfortable with Apex as I've written a handful of triggers, but, I have never tried something like this before so I thought I would seek input from the community.

  • When you want to show the message, on delete or on detail page when someone view it.
    – Ashwani
    Sep 5, 2013 at 16:42
  • @responsive - On the detail page. Sep 5, 2013 at 18:01

1 Answer 1


You don't need apex at all!

  1. Create a new visualforce page with a standard controller based on your object
  2. In this page create an apex:pageMessage
  3. Set render criteria basen on some field
  4. Add this page to the object layout

Visualforce page:

<apex:page standardController="Account"

<apex:pageMessage summary="This pageMessage for the supporter" 
                  rendered="{!Account.Name = 'Hello'}" />

Now go to the page layout and put a new section to the page, set a height to the 50px (you can read here about how to insert a page to the layout):

enter image description here

Put this visualforce page to the section and save the layout:

enter image description here

  • I appreciate your help so far. I should have been a little more clear. Can I access the parent account from the case Visual Force page to determine if it has any related records on a different object? The data I need doesn't exist on the case itself unfortunately. Sep 5, 2013 at 18:30
  • @Ek0nomik Hmm, i think you need a controller extension for this case. Sep 5, 2013 at 18:39
  • Thanks! I read through the documentation and created a controller extension and that did the trick. Sep 5, 2013 at 22:36
  • Awesome answer! Pity I can't upvote same answer multiple times :)
    – Novarg
    Jan 21, 2015 at 6:30
  • Hi @SergeyUtko - this is a great answer and has partially solved my problem also... I have added the VisualFlow component on the page layout of my object which works fine - my question is how do I make the same message appear on the the 'edit' state of the same object (e.g. if it showing on an Accounts it needs to show when editing that account also - i.e. before you press 'save') Thanks
    – TheAdmin
    Dec 12, 2016 at 11:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .