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

Salesforce Mass Editor (Chrome Extension) – ... This's my second Chrome Extension (First one is HERE) this year, named "Salesforce Mass Editor" and it supports for doing the below things : ・Makes any Salesforce list view to be a powerful mass editor. ・Mass insert, mass clone, mass update, mass delete, ALL-IN-ONE. ・Export record data to CSV fi...
Salesforce DevTools – A powerful Chrome exte... 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. ...
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...
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...