I've to Query a field(e.g X) from one object. Say I'm getting 20 records(LIST)
Now, I've to Query another object using result of above Query using field X (X field is common to both objects but has different names, say here Field1 and Field2) What is the easiest way to get data in Developer console ? is below correct
List<string> TP;
List<ObjA > Ds1= [Select id, name , TPID__C
from QRS_Quote_LOC_Plan_Bundle__c
where Field3 = '1111']; // Field3 is some another field
For(ObjA b : Ds1 )
TP.add(b.Field1); // storing common field data
List<ObjB> MasterD = [Select id, name from ObjB where Field2 in :TP ];
System.debug(MasterD );