I have to get IDs of Call custom object from Incident Transaction custom object and run a for loop on call feeding the list. Can someone help me here?
List<SObject> myCalls = [SELECT Call_abv__c FROM Incident_Transaction_abv__c];
List<Call2_vod__c> Call= new List<Call2_vod__c>();
for(Call2_vod__c cl:myCalls)
{
}
Getting below error:
Compile Error: Loop variable must be of type SObject at line
List
of typeIncident_Transaction_abv__c
for the query result?cl
is of typeCall2_vod__c
while the structuremyCalls
is of typeSObject
. Your question is a bit unclear, though.