salesforce - How to display child object fields in the VF page By querying through Parent object in SFDC -


I want to query the child object through a relationship with the child object. And I have to pass those values ​​on a VF page. I can get it.

You can ask hair fields through a sub-class in such a way:

  

Store results in a list of parents:

  from the list & lt; Parent__c & gt; LiParents = [Select the name of the ID from the parent, select the ID (from the child__R);]   

Then you can loop on the page in another way like this :

  & lt; Apex: repeat var = "p" value = "{! LiParents}" & gt; & Lt; Apex: outputText value = "{! P.Name}:" /> & Lt; Ul & gt; & Lt; Apex: repeat var = "c" value = "{! P.Child__r}" & gt; & Lt; Li & gt; & Lt; Apex: Output Text Value = "{! C.Name}" /> & lt; / Li & gt; & Lt; / Supreme: Repeat & gt; & Lt; / Ul & gt; & Lt; / Supreme: Repeat & gt;    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -