Use Instant Query

When you want to update or upsert information for a set of existing records, you can run Instant Query to retrieve the ID numbers and other information.

  1. Open any existing script that is based on Update or Upsert.
  2. Click the Run tab.
  3. Check the All box or enter the number of records that you want to download.
  4. Click Write Records, and then click Append or Overwrite.

    Overwrite will replace the only data for the number or rows specified. For example, if a previous query returned 100 rows and the new query returns 50 rows, the data set will display rows 1-50 of the new run and rows 51-100 from the previous run.

  5. Click Instant Query, and create a condition for the data that you want to download.

    For more information about conditions, see Add a condition.

  6. Click OK.

    For each record that matches the condition, Studio for Salesforce downloads existing data based on the fields that are in the script.

  7. Make the changes that you want, and then click Run to upload the updated data to Salesforce.