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.
- Open any existing script that is based on Update or Upsert.
- Click the Run tab.
- Check the All box or enter the number of records that you want to download.
- 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.
- Click Instant Query, and create a condition for the data that you want to download.
For more information about conditions, see Add a condition.
- Click OK.
For each record that matches the condition, Studio for Salesforce downloads existing data based on the fields that are in the script.
- Make the changes that you want, and then click Run to upload the updated data to Salesforce.