I don't know if the subject resume my problem . I would like to display in my HTML page the name of Supplier with adress . on HTML something like that :

<span> Supplier Name <br/> Supplier Adress  </span>

when I try to create a field as a formula type and edit this as a formula .

Account__r.Name + BR()+ Account__r.BillingAddress

the result is an error message like this

Error: Incorrect parameter type for operator '+'. Expected Text, received Location

Note that the formula return type is text.

  • You may wish to view this. Seems that addresses are their own type and, as such, will need you to break them apart before adding them to a string. Jul 1, 2015 at 21:41

3 Answers 3


Try using

Account__r.Name + BR()+ Account__r.BillingStreet+ BR() + Account__r.BillingCity + BR() +....

to build up the full address.

Address fields are a special case in Salesforce and are a concatenation of the underlying data fields. Selecting each individually can get around errors like this.


If it's a Visualforce page simply write:

<span> {!Account__r.Name} <br/> {!Account__r.BillingAddress} </span>

I doubt Account__r.BillingAddress may create error for you. Let me know. You can also try

<span> {!Account__r.Name} <br/> <apex:outputText> value="{!Account__r.BillingAddress}"/> </span>
  • I think the problem is BillingAddress is adress data type . I try to change visualforce ' <p > {!relatedTo.Account__r.BillingAddress} </p> but the error is 'Error: Unsupported type: common.api.soap.wsdl.Address used in expression: relatedTo.Account__r.BillingAddress' . When I try with BillinCity (data type text) it works ' <p > {!relatedTo.Account__r.BillingCity } </p>' so the problem is how to retrieve the value of adress and phone type . Jul 1, 2015 at 10:36
  • Refer to following link developer.salesforce.com/docs/atlas.en-us.api.meta/api/… It has all API names which you need. Phone fields has the API name Phone so you can reference it as {!Account__r.Phone} @JulioLudovicRamihone
    – Ashwani
    Jul 1, 2015 at 10:45

this code solve the proble , the formula is correct but when we display it , we use .

<apex:outputText> value="{!Account__r.BillingAddress}"/>

thanks a lot

You must log in to answer this question.

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