Salesforce Certified Platform Developer Practice Questions

Salesforce Certified Platform Developer exam preparation

Salesforce Certified Platform Developer practice questions in English: 180 questions with explanations. The mock exam has 60 questions and 105 minutes.

Salesforce Certified Platform Developer free question 3 / 10 · Domain 1: Developer Fundamentals

To keep a training attendance record for each user, you want to relate the custom object Training Attendance to the User object. Which way of building the relationship matches the Object Reference's description of relationships between objects?

  1. Neither master-detail nor lookup can be created to User, so put the user name in a text field to connect them
  2. Relate it to User with a master-detail relationship in which User is the master, and the owner of Training Attendance is set automatically from the master user
  3. A master-detail relationship with User as the master can be created, but custom fields cannot be added to User, so keep the attendance details on Training Attendance
  4. User cannot be the master of a master-detail relationship, so relate Training Attendance to User with a lookup relationship
Show the answer and explanation

Answer: D

Why this is correct
"Relationships Among Standard Objects and Fields" in the Object Reference says a master-detail relationship can be created between custom objects, or between a custom object and a standard object, but it cannot have BusinessHours, Idea, Lead, OrderItem, PriceBook2, Product2, QuoteLineItem, or User as the master. The table in "Custom Objects" agrees: User cannot be the master in a master-detail relationship (No), but it can be the target of a lookup from a custom object (Yes).

Why the other options are wrong
"Relate it to User with a master-detail relationship in which User is the master, and the owner of Training Attendance is set automatically from the master user" … The Object Reference lists User among the standard objects that cannot be the master of a master-detail relationship. A master-detail relationship with User as the master cannot be created.
"Neither master-detail nor lookup can be created to User, so put the user name in a text field to connect them" … In the table in "Custom Objects", User can be the target of a lookup relationship on a custom object (Lookup is Yes). A text field is not needed as a substitute.
"A master-detail relationship with User as the master can be created, but custom fields cannot be added to User, so keep the attendance details on Training Attendance" … In the table in "Custom Objects", User cannot be the master in a master-detail relationship (No) and can be extended with custom fields (Yes). Reading it as master-detail possible but custom fields not possible mixes up the columns of the table.

Related setting
The same table shows that Lead, Event, and Task also cannot be the master of a master-detail relationship. Where the object you want as the parent appears in the table decides whether the relationship can be master-detail or has to be a lookup.

Go to the Salesforce Certified Platform Developer practice app (10 free questions; purchase unlocks all questions)

See the full practice set