+ Start a Discussion

How to query right

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
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.