You need to sign in to do that
Don't have an account?
Ranu Jain
Master to child query
Hi,
I have an master object 'Account' and its child 'Agreement ' .
This child object have a picklist field Agg category which have following values - Data,multiple offering.
I want to run a query on Account and want to retrieve tagg with its one child (limit 1 in child query).
but requirement is if there is 'Data' category available than it should be retrieved and if 'Data' is not available than we will retrieve 'multiple offering'.
Is this possible by writing only one SOQl query?
Hi Ranu Jain,
I have written a code for you please try this and modify its query limit according your requirment I have written a generic code means bulkified.
--
Regards
Mohammad Usman
Hi Mousman,
Thank you very much for your efforts.
But that's can not be the solution because I don't have only 'Data' ,Their can be 'Data','Services'. These are not fixed.
I posted this one to search a way of doing this by query only. Is this possible?