Take the 2-minute tour ×
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.

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? –  mast0r 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? –  mast0r 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. –  mast0r Feb 20 '13 at 13:10
    
Is this on a standard page or Visualforce? –  Mike Chale Feb 20 '13 at 13:56

2 Answers 2

up vote 3 down vote accepted

Try using + instead of &?

share|improve this answer
1  
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

 
discard

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.