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 Dev Tools for Chrome™ Salesforce Dev Tools for Chrome™ is a Chrome extension helping Force.com developers do the below things: ・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 for Force.com Unit Test. ・Quick access to new...
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...
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 difficult to use, but it could more friendly. For example: 1. It doesn't support APEX an...
Force.com command-line tool : Force CLI and Salesf... The Force CLI is an open source app, which is written in Go, it allows us to work with Force.com data directly from the command line. Sometimes we might confuse Salesforce DX with Force CLI, which made its debut during the Salesforce For Developers Keynote 2016, as the two commond-line tools look...