I'm new to this, so sorry about this q.
I have 2 objects in an MDR: Child_c and Contacts. I have a list of child_c records which contains the contact_id. From the contact object, I need to get the firstName, lastName, Id (which ='s the contact_id in child). My query is wrong though. can someone help me with it please???
Thanks!
List peopleInEventContactInfo = new List ();
for (Contact c: [ select firstname, lastname, Id, ytd__c from Contact where id in ContactIds ]){ peopleInEventContactInfo.add(c); }