4

Say I have a field that contains data that is sensitive to errors like telling the difference between an I and l. That's I and l, which may appear identical depending on the font your browser is using. 0 and O (0 and O) is another common example of characters than can be difficult to distinguish.

If I show this field on a standard page layout users won't be able to easily pick the differences between the characters. The default font-family for a dataCol td is Arial, Helvetica, sans-serif.

How can I change the font-family for this field in a standard layout?

If I was using this field in a Visualforce page in an apex:outputText I could use the style attribute to change the font-family.

  • 1
    Maybe this helps: salesforce.stackexchange.com/questions/11816/… – Sergej Utko Jun 20 '13 at 22:18
  • @mast0r It's an option, but I'd rather not deal with the repercussions of changing the font family on all dataCols. My CSS selector Foo isn't strong enough to target just the one field in question. – Daniel Ballinger Jun 20 '13 at 22:24
  • 1
    Are you happy to create a VF page and drop it into a section on the native layout? You can make the VF page small, the size of the field you want to show and enable the label to the left of it. With this approach it looks like part of the standard layout, but is actually rendered via VF as per your needs. – Andrew Fawcett Jun 20 '13 at 23:08
  • @AndrewFawcett An inline VF page with an apex:outputText is certainly a viable solution. – Daniel Ballinger Jun 20 '13 at 23:34
  • 1
    On the idea exchange: success.salesforce.com/ideaView?id=08730000000Bp1pAAC – Carolyn Grabill Jun 21 '13 at 19:40
1

Create an inline VF page for your standard layout which renders the field as per your font requirements. You can make this as small as a standard field on the layout and enable the Label for the VF page to be displayed, thus giving the VF page label the field label, the appearance you get is much the same as the standard layout displaying the field.

| improve this answer | |
  • This solution will display the field properly, but doesn't allow for editing the field on the page layout edit page. – Jeremy Nottingham Jun 21 '13 at 17:23
  • Agreed, the question does tend to lean towards it being a visual clue requirement, though its not 100% stated edit is not a requirement i agree. If so, a custom button on the page to lead to a VF page purpose built for editing and previewing as they edited would be needed. – Andrew Fawcett Jun 21 '13 at 17:41

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.