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
mail2ghani1.3921762673905103E12mail2ghani1.3921762673905103E12 

Create a simple Visualforce page that when given a contact ID will display that contact, the account that it is associated to, as well as the billing street.

Create a simple Visualforce page that when given a contact ID will display that contact, the account that it is associated to, as well as the billing street.
kanavkhuranakanavkhurana
Hi,

You can create a page, say, 'ContactInfo', declare a 'Contact' standard Controller, and pull the desired information, as follows:

<apex:page standardController="Contact">
    <apex:pageBlock title="Contact Information">
        <apex:pageBlockSection>
            <apex:outputField value="{!Contact.Account.Name}" />
            <apex:outputField value="{!Contact.Account.BillingCity}" />
        </apex:pageBlockSection>
    </apex:pageBlock>
</apex:page>

Now, pass the contact Id to this page as a URL parameter, eg, http://yourinstance.salesforce.com/apex/ContactInfo?Id=xxxxxxxxxxx. That should do it.