PDI · Question #45
A company has been adding data to Salesforce and has not done a good Job of limiting the creation of duplicate Lead records. The developer is considering writing an Apex process to identify…
The correct answer is B. Merge is supported with accounts, contacts, cases, and leads. D. The merge method allows up to three records, including the master and two additional records. The Apex merge operation supports specific standard objects like Accounts, Contacts, Cases, and Leads, and allows merging up to three records into a single master record.
Question
A company has been adding data to Salesforce and has not done a good Job of limiting the creation of duplicate Lead records. The developer is considering writing an Apex process to identify duplicates and merge the records together. Which two statements are valid considerations when using merged? Choose 2 answers
Options
- AThe field values on the master record are overwritten by the records being merged.
- BMerge is supported with accounts, contacts, cases, and leads.
- CExternal ID fields can be used with the merge method.
- DThe merge method allows up to three records, including the master and two additional records
How the community answered
(39 responses)- A3% (1)
- B95% (37)
- C3% (1)
Why each option
The Apex `merge` operation supports specific standard objects like Accounts, Contacts, Cases, and Leads, and allows merging up to three records into a single master record.
When merging records, the field values of the *master* record are typically retained and generally take precedence over those of the records being merged, meaning they are not overwritten by the duplicate records.
The DML `merge` operation in Apex is specifically designed and supported for standard objects that commonly require deduplication, including Account, Contact, Lead, and Case.
External ID fields cannot be directly used with the `merge` method to identify records for merging; the `merge` operation relies on Salesforce record IDs.
The `merge` DML statement enables the consolidation of records by allowing one master record to absorb up to two additional duplicate records, combining their related lists and typically retaining the master's field values.
Concept tested: Apex DML Merge Operation
Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_dml_merge.htm
Topics
Community Discussion
No community discussion yet for this question.