0

I am trying to design a console where the first block of it contains a custom object "Store" something similar to Account. I want a list of Associates(custom object similar to contacts) in the same section of the block.

Could anyone give me the idea for a vf page of the list of associates on the store object:

    <apex:page standardController="Store__C">
        <apex:pageBlock title="Hello {!$User.FirstName} {!$User.LastName}!">
            We are viewing the Associates for this <b>{!Store__C.name}</b> Store.  
        </apex:pageBlock>
        <apex:pageBlock title="Associates">
             <apex:pageBlockTable value="{!Store__C}" var="Ass">
                  <apex:column value="{!Ass.Name}"/>
                  <apex:column value="{!Ass.Lastname}"/><apex:column value="{!Ass.Phone}"/
             </apex:pageBlockTable>
         </apex:pageBlock>
    </apex:page>

1 Answer 1

1

Assuming the relationship name from Store__c to Associate__c is called Associates, then the line you need is

<apex:pageBlockTable value="{!Store__c.Associates__r}" var="Ass">

N.B. use of an iterator ass is not best practice for US/UK audiences - try assoc

2
  • 1
    Yeah I was going to say...not the most professional use of abbreviation.
    – Adrian Larson
    Dec 19, 2016 at 17:32
  • Hello Adrian and Cropredy, I did think of coming up something other than ass. Couldn't know much of the limitations. I will try this code and will let you know how it goes.
    – abhi
    Dec 19, 2016 at 17:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .