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 '13 at 16:42
  • @responsive - On the detail page. – Justin Helgerson Sep 5 '13 at 18:01

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

| improve this answer | |
  • 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. – Justin Helgerson Sep 5 '13 at 18:30
  • @Ek0nomik Hmm, i think you need a controller extension for this case. – Sergej Utko Sep 5 '13 at 18:39
  • Thanks! I read through the documentation and created a controller extension and that did the trick. – Justin Helgerson Sep 5 '13 at 22:36
  • Awesome answer! Pity I can't upvote same answer multiple times :) – Novarg Jan 21 '15 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 '16 at 11:39

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.