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
shekhar 46shekhar 46 

i m trying to show trainer deals object data & trainer master object data on sameVFP.

i m trying to show trainer deals  object data & trainer master object data on sameVFP. , it is showing only training deals(details obj) data  but not trainer master data.(master objt)
public class trainingDealclass {
  public list<Trainer_master__c> traininglist{get;set;}     public trainingdealclass(){
        traininglist= [SELECT First_name__c, Last_name__c, Education__c,SELECT Course_c  FROM CRN_Training_deals__r)
                      FROM Trainer_master__c LIMIT 10];
<apex:page controller="TrainingDealClass">
    <apex:Pageblock title="training details">
        <apex:pageblocktable value="{!traininglist}" var="a">
            <apex:column value="{!a.First_name__c}"/>
            <apex:column value="{!a.Last_name__c}"/>
            <apex:column value="{!a.Education__c}"/>
         <apex:pageBlockTable value="{!a.CRN_Training_deals__r}" var="b">  
            <apex:column value="{!b.Course__c}"/>

Sai PraveenSai Praveen (Salesforce Developers) 
Hi Shekhar,

Can you confirm which is parent object and which is child object here?

shekhar 46shekhar 46
trainer_Master__c is parent object 
training_deals__c is child object