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
LaaralLaaral 

How to query right

Hi,
I have a soql query problem which I don't know how I should put it to make it work.
I'm trying to fetch all setups and all of them contain one of these contract information and also if the setup has a recurring fee or not. The setup doesn't have to have a recurring fee but I would like it to show all setups those which have recurring fee and those which doesn't have.

Select id, (Select id, name, date_of_invoice__c, setup__c from recurring_fee__c) from Setup__c where contract__c = 'a0oD0000001CdR7',  'a0oD0000001DIvB', 'a0oD0000001DGcw' and cost_center__r.groupid__c = '0012000000Jb5R6'  ORDER BY setup__c desc, date_of_invoice__c desc
Ashish_SFDCAshish_SFDC
Hi Laaral, 


What is the issue that you are facing? Are you getting any Error? 

I believe it should be ContractID rather than Contract - please review the same. 

Regards,
Ashish