You need to sign in to do that
Don't have an account?

Soql query on parents other child object
I want to write a soql query , My scenario is as follows. I have three objects objectA,objectB,objectC. objectA is the parent object for both objectB,objectC.
objectA - objectB (Master-detail relationship)
objectA - objectC (Master-detail relationship)
Now i want to retrieve records from objectC to objectB along with objectA fields. How can i achieve such functionality . any examples would help me out.
objectA - objectB (Master-detail relationship)
objectA - objectC (Master-detail relationship)
Now i want to retrieve records from objectC to objectB along with objectA fields. How can i achieve such functionality . any examples would help me out.
select id,(select id from Opportunities),(select id from test333__r) from account where id='001O000000MZVDG'
Note : All custom objects should be referred by __r and all standard objects should be referred with plural name.
Hope this helps !!
Please mark this as the best answer if this resolved your issue .