The CopyStorm/Medic Fix IsDeleted tool identifies records that have been deleted in Salesforce, removed from the Salesforce recycle bin, but not marked as deleted in CopyStorm.
This situation occurs when:
- A user deletes records in Salesforce and empties the recycle bin BEFORE CopyStorm has run.
- A system administrator empties the global recycle bin.
- A Salesforce API program does a hard delete on Salesforce records. A hard delete bypasses the Salesforce recycle bin mechanism.
Under normal circumstances, when a user deletes a record in Salesforce the record is not really deleted immediately. Instead, it is placed in the Salesforce recycle bin. The mechanism used by Salesforce is a hidden field named “isDeleted”. When CopyStorm runs it copies all modified records — including those where the “isDeleted” flag is set to true. After records are copied by CopyStorm, they are optionally deleted in the CopyStorm database based on parameters set on the Advanced tab.
If normal Salesforce accounts are not permitted to empty their recycle bin (a good practice) then the condition that needs this tool will likely not occur.
Running Fix IsDeleted in a GUI
The UI for the Fix IsDeleted tool contains three parts:
- The side of the dialog is used to select the tables to scan.
- The top part of the dialog has parameters that determine if problem records should be fixed.
- The lower part of the dialog displays the progress of a scan as it happens.
Running Fix IsDeleted as a Batch Job
The Fix IsDeleted tool can be run as a batch job using the following syntax:
- CopyStormMedic.bat -tool fixDeleted -run configFile.copyStormMedic
- sh CopyStormMedic.sh -tool fixDeleted -run configFile.copyStormMedic