Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce Exam DEX-450 Topic 10 Question 86 Discussion

Actual exam question for Salesforce's DEX-450 exam
Question #: 86
Topic #: 10
[All DEX-450 Questions]

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. 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?

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

Eladia
3 months ago
That makes sense. I might have to reconsider my answer.
upvoted 0 times
...
Ivette
3 months ago
I think it's C because the subquery should reference the child object name, Job_Applications_c.
upvoted 0 times
...
Brandee
3 months ago
As long as it's not option C, I'm good. 'Job_Applications_c' just sounds wrong, like they forgot to pluralize it or something.
upvoted 0 times
Katy
3 months ago
D) [SELECT Id, (SELECT Id FROM Job_Application_c) FROM Contact WHERE Account.Industry = 'Technology'];
upvoted 0 times
...
Belen
3 months ago
B) [SELECT Id, (SELECT Id FROM Job_Applications_r) FROM Contact WHERE Accounts.Industry = 'Technology'];
upvoted 0 times
...
Lura
3 months ago
A) [SELECT Id, (SELECT Id FROM Job_Applications_r) FROM Contact WHERE Account.Industry = 'Technology'];
upvoted 0 times
...
...
Reena
3 months ago
Haha, who names these fields anyway? 'Job_Application_c' - really? Couldn't they have come up with something a little more creative?
upvoted 0 times
Marya
2 months ago
Yeah, they could have definitely been more creative with the field names.
upvoted 0 times
...
Marge
2 months ago
I know right, 'Job_Application_c' does sound a bit bland.
upvoted 0 times
...
Gaston
2 months ago
Yeah, they could have definitely been more creative with the field names.
upvoted 0 times
...
Margarita
3 months ago
I know right, 'Job_Application_c' does sound a bit generic.
upvoted 0 times
...
...
Stefany
3 months ago
Why do you think C is the right choice?
upvoted 0 times
...
Ivette
3 months ago
I'm leaning towards C actually.
upvoted 0 times
...
Eladia
3 months ago
I disagree, I believe the correct answer is D.
upvoted 0 times
...
Ronny
4 months ago
D is the correct answer. The documentation clearly states that the field name is 'Job_Application_c', not 'Job_Applications_c' or 'Job_Applications_r'.
upvoted 0 times
...
Mireya
4 months ago
I think B is the way to go. Using the plural 'Accounts' instead of 'Account' makes more sense since the Contact object has a relationship to the Account object.
upvoted 0 times
Vesta
2 months ago
Great, thanks for the clarification!
upvoted 0 times
...
Annelle
2 months ago
That's correct. This query will efficiently retrieve the list of contacts with related Job_Application__c records where the Account Industry is 'Technology'.
upvoted 0 times
...
Shonda
3 months ago
So the correct statement would be [SELECT Id, (SELECT Id FROM Job_Applications_r) FROM Contact WHERE Accounts.Industry = 'Technology'];
upvoted 0 times
...
Cortney
3 months ago
Yes, you're right. It should be Job_Applications_r to access the related records in the subquery.
upvoted 0 times
...
Azalee
3 months ago
But wouldn't it be Job_Applications_r instead of Job_Application_c in the subquery?
upvoted 0 times
...
Joni
4 months ago
I agree, B seems like the correct option to retrieve the list of contacts with related Job_Application__c records.
upvoted 0 times
...
Earlean
4 months ago
I think B is the way to go. Using the plural 'Accounts' instead of 'Account' makes more sense since the Contact object has a relationship to the Account object.
upvoted 0 times
...
...
Dominga
4 months ago
Option A looks good, it's using the correct relationship name 'Job_Applications_r' and filtering on the Account Industry field.
upvoted 0 times
...
Stefany
4 months ago
I think the answer is A.
upvoted 0 times
...
Truman
5 months ago
I'm a little torn between A and D, to be honest. They both look like they could work, but I think A might be the more efficient approach. What do you all think?
upvoted 0 times
...
Scarlet
5 months ago
Okay, let's think this through. The question says the Contact object is the Master in the Master-Detail relationship, so the subquery should be using 'Job_Applications_r', not 'Job_Application_c' or 'Job_Applications_c'. I'm going with A.
upvoted 0 times
...
Glory
5 months ago
Ha! 'Accounts.Industry', that's a good one. Someone must have been having a bit of a brain freeze when they came up with that option. I'm gonna go with A, it looks the cleanest to me.
upvoted 0 times
Edgar
4 months ago
Definitely, A is the most efficient statement.
upvoted 0 times
...
Lon
4 months ago
I agree with you, A seems like the right choice.
upvoted 0 times
...
...
Colette
5 months ago
Wait, why are we using 'Accounts.Industry' in some of the options? Shouldn't it be 'Account.Industry'? This is making me a bit confused.
upvoted 0 times
...
Regenia
5 months ago
Okay, let's break this down. We need to retrieve all Contact records where the related Account Industry is 'Technology', and also get the associated Job_Application__c records. I'm leaning towards option A, since it seems to be the most straightforward approach.
upvoted 0 times
...
Hubert
5 months ago
Hmm, this is an interesting question. I'm not too sure about the difference between using 'Job_Applications_r' and 'Job_Application_c' in the subqueries. I'll have to think through this carefully.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77