The CopyStorm/Medic Refresh Columns tool replaces the value of one or more columns in CopyStorm with their current values in Salesforce.
This tool is typically used when the definition of a formula is modified in Salesforce or when a previously hidden column becomes visible to the user CopyStorm uses to authenticate with Salesforce.
When one or more columns in CopyStorm do not match the current value in Salesforce there are two methods which can fix the problem:
- Perform a forced update on the CopyStorm database using CopyStorm. This technique works but will cause every column in the CopyStorm tables to be read from Salesforce and written to CopyStorm, including columns whose data is already synchronized.
- Use this tool to limit reads/updates from Salesforce to specific columns. This technique can be many times faster than a forced update, and does not re-synchronize data that is already synchronized.
Running Refresh Columns in a GUI
The UI for the Refresh Columns tool contains three parts:
- The side of the dialog is used to select the tables and columns to scan.
- Click on a table name to launch a pop-up dialog for column name selection.
- The top part of the dialog has parameters that determine the date range of records to be updated.
- Leave these parameters blank to scan all records.
- The lower part of the dialog displays the progress of a scan as it happens.
Clicking on a column name will cause a column selection dialog to appear:
Managing Stale Formulas Automatically
When a formula column definition changes in Salesforce, timestamps on Salesforce records do not change. In practice this means that a formula column in the CopyStorm database will not reflect the proper value after a formula definition change until the next time a non-formula field on the record changes.
Starting with CopyStorm 7.34.10, both formula column definition changes and the last formula column refresh time are tracked. The “Manage Stale Formulas Automatically” option takes advantage of this tracking and, when checked, will:
- Automatically identify all formula columns whose definition has changed since their last refresh in CopyStorm, and add them to the column refresh set.
- Once the formula columns are refreshed, CopyStorm will update the formula refresh time in its tracking tables.
Running Refresh Columns as a Batch Job
The Refresh Columns tool can be run as a batch job using the following syntax:
- CopyStormMedic.bat -tool refreshColumns -run configFile.copyStormMedic
- sh CopyStormMedic.sh -tool refreshColumns -run configFile.copyStormMedic