How should the deve...
 
Notifications
Clear all

How should the developer do this?

1 Posts
1 Users
0 Likes
45 Views
Thurman
(@pochethurman)
Noble Member
Joined: 7 months ago
Posts: 361
Topic starter  

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

Show Answer Hide Answer

Suggested Answer: C

   
Quote
Share: