Skip to main content
I am unable to display a field of type Address in a Visual force page...
1 respuesta
  1. 21 mar 2014, 8:48 a.m.
    You sure can! The Address field on the Lead/Contact/Account are basically Compound Fields and they are actually made up further small fields which can be accessed like [ Lead : City; Contact : MailingCity; Account : BillingCity etc].

     

    If you take the example of Lead, you will have:

     

    <apex:inputField value="{!Lead.Street}"/>

    <apex:inputField value="{!Lead.City}"/>

    <apex:inputField value="{!Lead.State}"/>

    <apex:inputField value="{!Lead.Country}"/>

    <apex:inputField value="{!Lead.PostalCode}"/>

    If you take the example of Contact, you will have:

     

    <apex:inputField value="{!Contact.MailingStreet}"/>

    <apex:inputField value="{!Contact.MailingCity}"/>

    <apex:inputField value="{!Contact.MailingState}"/>

    <apex:inputField value="{!Contact.MailingCountry}"/>

    <apex:inputField value="{!Contact.MailingPostalCode}"/>