Overview

Merge records (List of SObjects) and set Master

The doMerge(List<SObject> objectList, SObject masterObject) method allows you to merge multiple Salesforce records programmatically, explicitly specifying the master record while adhering to the Plauti Deduplicate Merge Rules for field decisions. This method provides flexibility by enabling field updates on the master record during the merge process.

Key Points

  • The method merges a list of records (objectList) into a single specified master record (masterObject).
  • The masterObject is explicitly defined and must include the Id of the record designated as the master.
  • Fields on the masterObject can be updated during the merge, and these updates are reflected in the resulting master record.
  • Predefined field merge rules dictate how conflicting field values are resolved during the merge.
  • Returns a boolean indicating the success (true) or failure (false) of the operation.