開発者は、任意の 2 つのオブジェクトレコード間の Salesforce 名項目を比較する汎用 Apex メソッドを作成したいと考えています。たとえば、取引先と商談の名前フィールドを比較します。またはアカウント名と連絡先。 Name フィールドが存在すると仮定すると、開発者はこれをどのように行うべきでしょうか?
正解:A
Casting each object to an sObject and using the get method to compare the Name fields is the correct approach. This is because sObjects are generic object representations that can be used to access the fields of any Salesforce object dynamically. References: sObject Class