function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Nitish 73Nitish 73 

Contact MailingAddress field not supported

Hi All, 

I am trying to display the address of a contact on a visualforce page. I am trying to reference the field 'Mailing Address' so that I would get that little google maps snapshot, like we do on the standard Contact detail page

User-added image
But I am getting an error 

Unsupported type: common.api.soap.wsdl.Address used in expression: Contact.MailingAddress

I have leanrt from some forums that the Mailing address is a compounded field and hence cannot be referenced . Is there a way I can mimic this Mailing Address and display that little google snapshot ? 


Any help is appreciated. 


Thanks
Nitish
kevin lamkevin lam
Address compound fields are availble in API version 30.0 or later, is that what you're using?
Nitish 73Nitish 73
Hi Kevin,

I am using API version 34.0 , but it gives me that error when I try to put it on a visualforce page. Is there any other way ?

Thanks
Nitish
kevin lamkevin lam
Address compound fiels are available in SOAP or REST API.
Amit Chaudhary 8Amit Chaudhary 8
Please check below post for all Contact Standard field Name
https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_contact.htm

MailingAddress:- The compound form of the mailing address. Read-only. See Address Compound Fields for details on compound address fields

Please use below field :-
MailingCity
MailingState
MailingCountry
MailingPostalCode

Please let us know if this will help you
Thanks
Amit Chaudhary