Salesforce
PDII · Question #216
PDII Question #216: Real Exam Question with Answer & Explanation
Sign in or unlock PDII to reveal the answer and full explanation for question #216. The question stem and answer options stay visible for context.
Question
A developer wants to write a generic Apex method that will compare the Salesforce Name field between any two object records. For example, to compare the Name field of an Account and an Opportunity; or the Name of an Account and a Contact. How should the developer do this?
Options
- ACast each object into an sObject and use sObject.get('Name') to compare the Name fields
- BInvoke a Schema.describe() function to compare the values of each Name field
- CUse a String.replace() method to parse the contents of each Name field
- DUse the Salesforce Metadata API to extract the value of each object and compare the Name fields
Unlock PDII to see the answer
You've previewed enough free PDII questions. Unlock PDII for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.