The Job_Application__c custom object has a field that is a Master-Detail relationship to the Contact object, where the Contact object is the Master

20 of 63The Job_Application__c custom object has a field that is a Master-Detail relationship to the Contact object, where the Contact object is the Master. As part of a feature implementation, a developer needs to retrieve a list containing all Contact records where the related Account Industry is ‘Technology’ while also retrieving the contact’s Job_Application__c records. Based on the object’s relationships, what is the most efficient statement to retrieve the list of contacts?

Was this helpful?

1 / 9

SimoR

SimoR

The Corrent Ansewer is: [SELECT Id, (SELECT Id FROM Job_Applications_r) FROM Contact WHERE Account.Industry = ‘Technology’];
because the subquery points to the Contact child object (Job_Applications_r) and then filters the parent object (Account). the plural refers only to the child objects here because it is not correct AccountS.Industry

Comments are closed.