I would like to change the entire background color, or place a background image on all layouts of the account object based on a value in a custom field in said object.

The use-case here is I want the account page to have a red color if a customer is sent to collections. That collections field would be either a text or picklist that would be populated via netsuite.

Unfortunately, I don't know where to start.

  • Do you have any custom page like Visualforce page or lightning component where you want to change the background color ? Jun 22, 2017 at 16:58
  • Right now no. All that I would be using is the default page. Jun 22, 2017 at 17:19
  • you won't be achieve that in the standard page. You have to create a visualforce page or lightning component to achieve it. Jun 29, 2017 at 5:10

2 Answers 2


As far as I know, there is no possible standard way to do this but by developing a set of Visualforces and routing them, but imho, that is an effort far from worth.

While not being the same, you can choose the color of the tab and "object theme".

  • Can the object theme be conditional? Jun 22, 2017 at 17:19

Probably the easiest way to achieve something like this, would be to create a lightning component that you could put in the banner section of your Lightning Page.

I would create a custom field that changes based on your criteria, and then have it output text that can be used as a reference to the CSS. For example:

<aura:attribute name="attributeClass" type="String" />
<aura:attribute name="attributeText" type="String" />

<div class="{!v.attributeClass}"> <h4>This account is {!v.attributeText}</h4></div>

I would have a doInit js function that then set those attributes with your field information, and your CSS would be dynamically referenced in this way.

Hope this helps.

  • This is very helpful. However, we aren't using Lightning. Would this option be limited to only using Lightning? Jun 22, 2017 at 17:34
  • Yes, this would only be usable if you have Lightning enabled. The only other option is to create a custom VF page, but that is a lot more work...
    – Logan
    Jun 22, 2017 at 17:36
  • You don't need to add hope this helps at the end of each answer. It's implicit and just adds noise. The format here is terse Q&A.
    – Adrian Larson
    Jun 22, 2017 at 17:53

You must log in to answer this question.

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