Notifications
Clear all
Topic starter
18/09/2022 3:54 pm
A developer wants to write a generic Apex method that will compare the Salesforce Name filed 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?
- A . Use a String.replace( ) method to parse the contents of each Name field.
- B . Invoke a Schema,describe() function to compare the values of each Name field.
- C . Cast each object into an sObject and use sObject.get(Name’) to compare the Name fields.
- D . Use the salesforce metadata API to extract the value of each object and compare the name fields
Suggested Answer: C