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
YWAMRTOadminYWAMRTOadmin 

Querying certain fields (Sections) And Related Lists

Hi, I wanted to know how I can query a section of a contact page, and a related list of that contact and put it as a tab.

 

So my users can click the tab, and it brings up a contact look up field, with other fields from the contact, as well as a related list. 

Best Answer chosen by Admin (Salesforce Developers) 
HarmpieHarmpie

With Visual Force you can.

<apex:page standardController="Contact"> <apex:pageBlock> <apex:pageBlockTable value="{!MyCustomObject__r}" var="cust"> <apex:column value="{!cust.Name}" /> </apex:pageBlock> </apex:page>

 

This is how you would iterate a related list of an object that has a reference to a Contact. You can modify this page to include a lookup to a contact and refresh the list on change of this lookup. You can also call this page with a valid contact Id.

All Answers

HarmpieHarmpie

With Visual Force you can.

<apex:page standardController="Contact"> <apex:pageBlock> <apex:pageBlockTable value="{!MyCustomObject__r}" var="cust"> <apex:column value="{!cust.Name}" /> </apex:pageBlock> </apex:page>

 

This is how you would iterate a related list of an object that has a reference to a Contact. You can modify this page to include a lookup to a contact and refresh the list on change of this lookup. You can also call this page with a valid contact Id.

This was selected as the best answer
YWAMRTOadminYWAMRTOadmin

That sounds exactly like I want!

How would I add the contact lookup/refresh to the page?

Also, I've been trying to query a related list, and no columns are showing up. Not even a {!(var).Name
Message Edited by YWAMRTOadmin on 05-04-2009 11:10 PM