Big Halloween Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: simple70

Exam PDII All Questions
Exam PDII All Questions

View all questions & answers for the PDII exam

Salesforce Developers PDII Question # 37 Topic 4 Discussion

PDII Exam Topic 4 Question 37 Discussion:
Question #: 37
Topic #: 4

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.

Assuming the Name field exists, how should the developer do this?


A.

Cast each object into an sObject and use sObject.get to compare the Name fields,


B.

describe) function to compare the values of each Name field.


C.

Use the Salesforce Metadata API to extract the value of each object and compare the Name fields.


D.

Use a string. Replace () method to parse the contents of each Name field and then compare the results.


Get Premium PDII Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.