Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam CRT-450 All Questions

View all questions & answers for the CRT-450 exam

Exam CRT-450 topic 1 question 160 discussion

Actual exam question from Salesforce's CRT-450
Question #: 160
Topic #: 1
[All CRT-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?

  • A. [SELECT Id, (SELECT Id FROM Job_Applications_r) FROM Contact WHERE Account.Industry = 'Technology'];
  • B. [SELECT Id, (SELECT Id FROM Job_Applications_r) FROM Contact WHERE Accounts.Industry = 'Technology'];
  • C. [SELECT Id, (SELECT Id FROM Job_Applications_c) FROM Contact WHERE Accounts.Industry = 'Technology'];
  • D. [SELECT Id, (SELECT Id FROM Job_Application_c) FROM Contact WHERE Account.Industry = 'Technology'];
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Pally88
Highly Voted 3 years, 4 months ago
Correct is A
upvoted 20 times
...
JCTheGenius
Highly Voted 3 years, 2 months ago
Response A: Contact is parent of Job_Application__c hence it can access child records using "__r" relationship. Account must be a parent of Contact so it is related using Account.xxx.
upvoted 12 times
...
PriyankN
Most Recent 8 months, 3 weeks ago
Tested this on my org, A is correct answer
upvoted 1 times
...
Nand072
1 year, 2 months ago
Selected Answer: A
it could not be C! Come on! Querying child object cannot be done without the suffix __c.
upvoted 2 times
...
1vanTT
1 year, 5 months ago
Selected Answer: A
https://trailhead.salesforce.com/content/learn/modules/soql-for-admins/create-relationship-queries-with-custom-objects
upvoted 2 times
...
Vladrky
1 year, 10 months ago
I think the correct answer is B because of the plural form. So it should be Accounts instead of Account
upvoted 2 times
...
ApexMike
2 years, 1 month ago
Selected Answer: A
A is the answer. You query the relationship which ends with __r not __c
upvoted 8 times
...
AK112233
2 years, 10 months ago
Selected Answer: A
A should be correct. You can't use Job_Applications__c in select query since Job_Application__c is custom object and child to Contact
upvoted 9 times
...
HolyErhan
2 years, 11 months ago
Correct A
upvoted 6 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...