Display Address type field on Visualforce Page

Address is an especial type of fields in Salesforce, which is a structured compound data type, that we can’t use it directly on Visualforce page. And there will occure a compile error like “Unsupported type: common.api.soap.wsdl.Address used in expression: record.BillingAddress”, if we did that.

As the code sample below, we need to use fields BillingStreet, BillingCity, BillingState, BillingPostalCode, BillingCountry, BillingLatitude and BillingLongitude instead of BillingAddress field.

Apex Code

VF Page


Reference : compound fields address

Enjoy it!

Related Post

Setup an awesome Salesforce developer environment ... Why Sublime Text 3 ? I've been working with Force.com for about 2 years, and always using Eclipse+Force.com IDE(See here, Eclipse Force.com IDE Installation)as my development environment. I don't think it is really difficult to use, but it could be more friendly. For example: 1. It doesn't suppo...
Salesforce DevTools for Chrome™ Salesforce DevTools is a Chrome extension helping Force.com developers do the below things: ・Generate Salesforce data model (ERDs) as svg. ・Export definition of objects to Excel file. ・Show / Hide object API name on object detail page by 1 Click. ・Quick generate test data Apex Code and SOQL. ...
SalesforceXyTools For Chrome – Quick Search ... What is SalesforceXyTools for Chrome ? SalesforceXyTools for Chrome is a developer tools for Salesforce,SFDC,Force.com. Login SFDC By 1 click Quickly Search For Sobject,Apex,Trigger,Page,Component,EmailTemplate,SataticResource, etc Auto Create Soql, Run Soql, Soql History Run Apex Script. Qu...
Using URL parameters on Salesforce standard pages Salesforce has many URL parameters can be used on its standard page, with this kind of parameters, you can do some URL hacking on it, as below: Note: All of parameters must be encoded with UTF-8. Login page There are two ways to login and access into Salesforce from url. 1. https://