Skip to main content
formatting the SOQL so that its not on one single line
Source Link
BarCotter
  • 12.4k
  • 4
  • 38
  • 58
list<gmod__Opportunity_Forecast__c>  opflist = [Select 
 id                                                   id,Name
                                                    Name,
                                                    gmod__Product__c,
                                                    gmod__Quantity__c,
                                                    gmod__Price__c ,
                                                    gmod__Month__c,
                                                    gmod__date__c, 
  gmod__Quarter__c                                                  gmod__Quarter__c,
                                                    gmod__Amount__c ,Actual_Price__c
                                                    Actual_Price__c,gmod__Year__c
                                                    gmod__Year__c,gmod__Month_Text__c
                                                    gmod__Month_Text__c,
                                                    Forecast_Date__c,
                                                    gmod__Opportunity_Forecast__c.gmod__Product__r.Name
                                                    from gmod__Opportunity_Forecast__c ]; 
list<gmod__Opportunity_Forecast__c>  opflist = [Select id ,Name ,gmod__Product__c,gmod__Quantity__c,gmod__Price__c , gmod__Month__c,    gmod__date__c,  gmod__Quarter__c ,gmod__Amount__c ,Actual_Price__c ,gmod__Year__c ,gmod__Month_Text__c ,Forecast_Date__c,gmod__Opportunity_Forecast__c.gmod__Product__r.Name from gmod__Opportunity_Forecast__c ]; 
list<gmod__Opportunity_Forecast__c>  opflist = [Select 
                                                    id,
                                                    Name,
                                                    gmod__Product__c,
                                                    gmod__Quantity__c,
                                                    gmod__Price__c ,
                                                    gmod__Month__c,
                                                    gmod__date__c, 
                                                    gmod__Quarter__c,
                                                    gmod__Amount__c ,
                                                    Actual_Price__c,
                                                    gmod__Year__c,
                                                    gmod__Month_Text__c,
                                                    Forecast_Date__c,
                                                    gmod__Opportunity_Forecast__c.gmod__Product__r.Name
                                                    from gmod__Opportunity_Forecast__c ]; 
Source Link
nikkey
  • 1.4k
  • 3
  • 29
  • 56

Display all the records instead of related record in a visual force page

I have a custom object as " gmod__Opportunity_Forecast__c " it has a look up relation with "product" object and api name is give as "gmod__Product__c".

1)Im querying on "gmod__Opportunity_Forecast__c " object to retrive the related records ,but it displays all the records on gmod__Opportunity_Forecast__c in Visual force page.

list<gmod__Opportunity_Forecast__c>  opflist = [Select id ,Name ,gmod__Product__c,gmod__Quantity__c,gmod__Price__c , gmod__Month__c,    gmod__date__c,  gmod__Quarter__c ,gmod__Amount__c ,Actual_Price__c ,gmod__Year__c ,gmod__Month_Text__c ,Forecast_Date__c,gmod__Opportunity_Forecast__c.gmod__Product__r.Name from gmod__Opportunity_Forecast__c ]; 

I shall appreciate your help.