Updating Existing Records in Salesforce
To update records in Salesforce in bulk, you will first need to pull them to your Excel spreadsheet. You can do it using either SOQL or Reports. You can retrieve your data with any other tool or directly from Salesforce by exporting a report too. The main thing to remember is that you need to have record Ids in order to be able to update the records.
In our example here we’ll use XL-Connector to update the stage of all opportunities under one specific account. We’ll use the following query to pull the data:
SELECT Name,Id, StageName FROM Opportunity WHERE Account.Name = ‘AVL GmbH’
Please note that we’re pulling record IDs. Even though a column of record IDs is required to be able to update records via Salesforce.com API, XL-Connector 365 has a built in feature to convert unique record names into Ids. Please see the following article on details about that: Using Record Names Instead of Ids in ID and Lookup Fields
We got the following results back from our sample database:
Now we want to change the stage of all four Opportunities to Closed Won. After the stage has been changed we’ll select the rows of data so that the selection spans across all the records that we want to update:
Then click Create/Modify -> Update all/Update Selected in the Home tab of the XL-Connector 365 main window:
In the Update screen, select Opportunity as the object to work with and click on Mappings manager:
In the Mappings dialog box, make sure you map your columns to the correct fields in Salesforce. The column with record Ids must be mapped to the Id field in order for the Update operation to work. Click on Apply when the mappings are done:
You can define constant mappings and owner change settings in the Mapping page of each flow step.
Any manual push operation will be saved the mappings and other settings in a reusable “Flow Step” that can be later run separately or as a part of a larger Flow.
The following setting determines the behavior of the flow step if the operation returns at least one error:
There are also several options that you can adjust for each Upsert operation and the associated flow step:
Click on Run and Save to run the Update operation according to the provided settings and save all the settings as a reusable Flow Step. In this case you’ll be able to run the same Update operation again from the same area in your sheet with a single click on the Run Flow or Run Flow Step button.
Click Run to only run the Update operation of the selected data and not save the mappings and other settings as a reusable Flow Step.
Click Save to save all the provided settings as a reusable Flow Step. In this case you’ll be able to run the same Update operation again from the same area in your sheet with a single click on the Run Flow or Run Flow Step button.
After the operation is completed, all operation results, along with the updated record Ids will be written on the right from your data, one column over: