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

inner query issue

Hi All .

I have three objects.obect1__c, object2__c, this object1 has object2 look up and object3 has object2 lookup.

In this object1 lookup field is test__c and object3 lookup field is test__c. and object3 fields are f1,f2 and date1


i want to get the object1 id as well as object3 fields f1,f2 values.For this i have written like this.


list<object3__c> obj3list=[select id,f1__c,f2__c,test__c from object3__c where test__c in(select test__c from object1__c) and];

in this above query returns only the object3 data.But i want to get the object id also.


Can you please help me this.



Thanks in advance



Can you clarify what you are trying to do - you mention that you want the object id also - which object is this?

custom object.

You have said in your original question you have 3 custom objects.  Which one are you trying to retrieve the details for?