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
Naresh123Naresh123 

Need Script to dispaly Contact Info and related Account field

Hi Folks.

                I want to create Visualforce page that when given a contact ID will display that contact, the account that it is associated to, as well as the billing addresses of each (which should be the same).  Can anyone help me out to write this..........Thanks in advance

Ispita_NavatarIspita_Navatar

 

Hi,

You will have to use <apex:detail> tag  as per the code snippet below:-

 

<apex:page standardController="Contact">

  <apex:pageBlock title="Hello {!$User.FirstName}!">

      You belong to the {!contact.firstname}.

  </apex:pageBlock>

  <apex:detail subject="{!$CurrentPage.parameters.id}"  relatedList="false"/>

  <!--<apex:relatedList list="OpenActivities" subject="{!$CurrentPage.parameters.relatedId}"/> -->

</apex:page>

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.