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 Salesforce DX IDE environment with Visual St... My favorite Salesforce IDE MavensMate is no longer being developed and supported, because of app owner Joe's personal reasons. I'm deeply moved when I read his post (HERE) and realize that devoting to open source needs huge strength and courage, it costs so much personal time other guys can't see. ...
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...
Works with Salesforce Developer Experience (DX) Salesforce Developer Experience (DX) will be released from Winter 18, which is a really exciting news I heard from SWTT (2017) , I'll share you how to work with Salesforce DX in this post, so far it still can be only usded in Dev Hub Trial Org though. Download & Install Salesforce DX CLI First, ...
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. ...