Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a text area (long) field. It contains the default value "Text1" & BR() & "Text2".

It never renders the br() tag correctly, the final result is always 'text1 BR() text2'. Field type is text area(long). Setup to display 2 lines.

What am I doing wrong here? I've tried both "text1" & BR() & "Text2" and "Text1"&BR()&"Text2". And according to the documentation it should work.

share|improve this question
Is it for apex:inputTextarea? – Sergey Utko Feb 20 '13 at 12:47
Nope, it's just a default formula value for a text field. No apex involved. – akarnid Feb 20 '13 at 12:50
How do you show the text, where is it broken? At custom vf-page or on the standard layout page? – Sergey Utko Feb 20 '13 at 12:54
I just tested your code "Text1" & BR() & "Text2" for an account object and it works fine for me. At the account creation standard page i can see an input text (long) with Text1 and Text2 with brake in between. – Sergey Utko Feb 20 '13 at 13:10
Is this on a standard page or Visualforce? – Mike Chale Feb 20 '13 at 13:56
up vote 4 down vote accepted

Try using + instead of &?

share|improve this answer
the +did the trick. Thanks @user31! FWIW - this was on standard page layout. No Visualforce at all. – akarnid Feb 21 '13 at 14:56
woop woop! what you did appears to be fully supported - wanna raise a Case? – bigassforce Feb 21 '13 at 16:36

If you are using this formula field on a Visualforce page with an apex:outputText try using the escape attribute.

So, something like:

<apex:outputText value="{!Custom_Object__c.Custom_Formula_Field__c}" escape="false"/>
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.