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

How to fetch Id from the first query and fetch the record for the 2nd query.
Query 1:
List<Service_Line__c> ServiceLineList =[Select id, Name from Service_Line__c ];
Query 2:
List<Service_Line_Item__c > ServiceLineItemList =[Select Name,Type__c,Component_Serviced__c,Effort_Required_Man_Hours__c, Cost_Incurred__c from Service_Line_Item__c ];
I want to use the fetched id from the 1st query and display the result of the 2nd query .
The 2nd query should only be performed on the result fetched from the 1st query
How can I pass id of 1st query and get the results of the 2nd query
Thanks in Advance!
2nd query is dependent on the 1st query
List<Service_Line__c> ServiceLineList =[Select id, Name from Service_Line__c ];
Query 2:
List<Service_Line_Item__c > ServiceLineItemList =[Select Name,Type__c,Component_Serviced__c,Effort_Required_Man_Hours__c, Cost_Incurred__c from Service_Line_Item__c ];
I want to use the fetched id from the 1st query and display the result of the 2nd query .
The 2nd query should only be performed on the result fetched from the 1st query
How can I pass id of 1st query and get the results of the 2nd query
Thanks in Advance!
2nd query is dependent on the 1st query
If it helps please mark as correct, it may help others.