I have a MDR, and on the master there's a Roll up Field Summary on the details. If the # of the details > 0, I want to render a graphic for the user or highlight the field, or something. The Master's Page Layout is a STD page layout. A catch is that the decision will play off of the roll up field summary which is a little bit gimicky.

Can I do this natively? Otherwise I'll drop in a Visual Force and be done with it.

2 Answers 2


Unfortunately there isn't a great way to conditionally render an element on a page layout. However, you can get something like that with formula fields. Instead of putting the rollup summary on the field, create a formula field that displays an image if the count is great than zero, otherwise it just displays a blank space.

  • that might work. if i have an image on my desktop that i want to upload and use for the image, should i throw that in as a static resource? Oct 22, 2013 at 18:13
  • Yes, a static resource is recommended for this.
    – Mike Chale
    Oct 22, 2013 at 18:18
  • You can also use a document (as in Ben Pirih's answer) to store the image. Take care with static resources as you'll need to strip the timestamp if you always want to use the latest version (keep it if you want to lock the image to a particular version). Oct 23, 2013 at 16:34

Here is a formula that references an attachment and displays depending on # of rollUpSummary.. Same idea if you use static resource. Note we also pass a querystring parameter time to prevent caching of the image by the browser. Our images get updated very often..

if ( rollUpSumamry == 0 , "noImage", IMAGE("/servlet/servlet.FileDownload?file=" & attachmentImage + "&t=" + TEXT(NOW() - CreatedDate) , "image", 600, 600))

  • 1
    one consideration attachments are only going to be visible to users with access to the parent record, documents might be a better choice. Also might be good to use the URLFOR with an ACTION here, since that will survive any future changes to the download url. IMAGE(URLFOR($Action.Document.Download, document.id),"image")) Oct 23, 2013 at 16:39
  • Good point about security. In our case we only wanted people who have access to parent record to be able to access child. Oct 23, 2013 at 21:52

You must log in to answer this question.

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