What pre-validation options does SFDMU offer before inserting data?


When using SFDMU, it operates in a partial success mode, where valid records are inserted even if others fail. This can leave an Org in an unfinished state, with some records inserted and others not.

For such scenarios, a data validation or rollback feature is often requested. SFDMU's simulationMode only detects missing parent records (both lookup and master-detail), creating a 'MissingParentRecordsReport.csv' file, but it does not validate against validation rules or field uniqueness.

What pre-validation options does SFDMU offer?


Since SFDMU does not fully support record rollback, there are two main pre-validation options:

  1. Simulation Mode: By setting simulationMode=true, you can preview which records are fetched from the source and which are pending insertion into the target. However, since the records in the target org are not actually updated, this mode does not test against target triggers, validation rules, or other functions requiring actual record updates.
  2. All-or-None Transaction: By setting allOrNone=true for an sObject, you can trigger Salesforce's out-of-the-box (OOTB) all-or-none feature, which is supported only by the Salesforce REST API. Additionally, setting alwaysUseRestApiToUpdateRecords=true forces SFDMU to use the Salesforce REST API for all transactions in the current job. Note that the REST API consumes more resources and quotas than the Bulk API, and may encounter limitations. This method will rollback all records modified only by the current unsuccessful transaction; other transactions that have completed successfully will remain committed.
Last updated on 18th Apr 2024