How can I force merging duplicate records
Force an immediate merge of duplicate records (Auto Yes / Steward Yes) outside of the automated schedule. Execute the merge batch directly.
Force Merging Duplicate Records
Duplicate records with a status of Auto Yes or Steward Yes are automatically merged based on the schedule configured under Delpha Setup > Duplicates > Merge Settings > Auto Merge Scheduler.
If you need to trigger an immediate merge outside of the automated schedule, you can manually execute the merge batch using either the Salesforce Developer Console or Custom Apex.
Option 1: Salesforce Developer Console (Manual Execution)
You can run the merge batch directly using Anonymous Apex in the Developer Console.
Open the Developer Console in Salesforce (Gear icon > Developer Console).
Click Debug > Open Execute Anonymous Window (or press
Ctrl + E/Cmd + E).Paste the following Apex snippet:
String settingsId = 'YOUR_DELPHA_SETTINGS_RECORD_ID'; // Replace with your Delpha Merge Settings ID
Database.executeBatch(new delpha.DDQ_DuplicateRecordAutoMerge(settingsId), 10);Click Execute.
Batch Size Adjustment: The 10 parameter defines the batch execution size. If you encounter performance bottlenecks, governor limit errors, or timeout issues, lower this value (down to 1).
Option 2: Custom Apex Integration (Programmatic Execution)
You can call the delpha.DDQ_DuplicateRecordAutoMerge batch class directly within server-side Apex code to automate or customize when force merges occur:
Scheduled Apex: Implement
Schedulableto run the merge job on a custom schedule distinct from the standard Delpha setup.Queueables or Controllers: Execute the batch process in response to custom UI button clicks, Apex triggers, or background processes.
Example (Scheduled Apex Class):
Last updated
Was this helpful?