# Refresh Formulas

The CopyStorm/Medic Refresh Formulas tool replaces the values of formula columns in CopyStorm with their current value in Salesforce.

This tool is typically used when the definition of a formula is modified in Salesforce.

CopyStorm minimizes the amount of records copied from Salesforce by only copying records whose modification date has changed. When a formula column is modified in Salesforce record modification times do not change so CopyStorm does not pick up the new formula values for older records. There are two ways to update this data in the CopyStorm database:

* Performing 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.
* Using this tool to limit reads and updates from Salesforce to formula columns. This technique can be many times faster than a forced update.

## Running Refresh Formulas in a GUI

To access the Refresh Formulas GUI:

* Select “Other Tools” from the top-level menu.
* Select “Data Synchronization”, then “Refresh Formulas”.

The Refresh Formulas tool contains three parts:

* The side of the dialog is used to select the tables to scan. Note that if a table without formulas is selected it will be silently ignored by the tool.
* The top part of the dialog is used to specify 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.

![](/files/445nTfJYNKfArHBJArNt)

## Running Refresh Formulas as a Batch Job

The Refresh Formulas tool can be run as a batch job using the following syntax:

* Windows
  * `CopyStormMedic.bat -tool refreshFormulas -run configFile.copyStormMedic`
* Linux
  * `sh CopyStormMedic.sh -tool refreshFormulas -run configFile.copyStormMedic`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learn.capstorm.com/reference/copystorm-medic/refresh-formulas.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
