You are here: Runner > Runner: Run an Update or Upsert script to change or add records in Salesforce
Runner: Run an Update or Upsert script to change or add records in Salesforce
When you update a record, you need to include the ID for each record.
- If the file does not include headers, or if you added a new sheet, click Write Headers.
- Click Condition, apply criteria.
Note: For an update or upsert, you do not need to supply values for all the criteria. This means that you can use a more complex script to run a simpler query.
- Click Instant Query to retrieve the IDs and the data you want to change for records that are already in the system.
If prompted, log in to Salesforce.
For more information on conditions, see Create a Query script to pull data from Salesforce.
- Enter the data changes or the data for new records (if you are using Upsert). Studio for Salesforce has tools that can help:
- If a column heading includes List of Values, click List of Values on the ribbon and then choose a value.
- If a column heading includes Look Up, click Look Up on the ribbon, type text in the Search box to look for the values, select the value or values that you want, and then click Copy to Selected Row. The % character is a wildcard character.
Tip: Type a single quotation mark (‘) before values that start with 0, such as a ZIP/Postal codes.
- Confirm or enter the values for Start Row, End Row (0 means all rows that contain information), Log Column, and ID Column.
- Click Save on the Quick Access Toolbar, and save the data file.
- Click Data Validation.
Salesforce checks the data for missing or invalid items and returns a message for each record in the Data Validation column.
Note: You can validate the data even when you are not logged in to Salesforce.
- Click Run, and then click one of the following:
- Run Specified Range
- Run Validated Rows
- Run Error Rows Only
- Run Unprocessed Rows Only
- Run Selected Rows Only