Salesforce Platform Developer I (legacy) — Question 48
The Review_c object has a lookup relationship up to the Job_Application_c object. The Job_Application_c object has a master-detail relationship up to the
Position_c object. The relationship field names are based on the auto-populated defaults.
What is the recommended way to display field data from the related Position_c record on a Visualforce page for a single Review_c record?
Answer options
- A. Use the Standard Controller for Review_c and cross-object Formula Fields on the Position_c object to display Position_c data.
- B. Use the Standard Controller for Job_Application_c and a Controller Extension to query for Position_c data.
- C. Use the Standard Controller for Job_Application_c and cross-object Formula Fields on the Review_c object to display Position_c data.
- D. Use the Standard Controller for Review_c and expression syntax in the Page to display related Position_c data through the Job_Application_c object.
Correct answer: D
Explanation
The correct answer is D because it allows direct access to the Position_c data through the Job_Application_c object by utilizing expression syntax on the Visualforce page. Option A is incorrect as it does not provide a way to access Position_c data directly in this scenario. Option B is not ideal since it complicates the data retrieval process without necessity. Option C incorrectly suggests using cross-object Formula Fields on Review_c, which is not applicable for accessing Position_c data.