Choose where you’d like to start

Update record in Salesforce

Overview

Update a record in Salesforce by specifying the record ID.

Note: This task is applicable only to Zoho Creator.

Syntax

<variable> = salesforce.sales.update(<salesforce_connection>, <salesforce_module><record_ID>, <data_map>);

where,

ParameterDescriptionData type

<variable> 

is the variable which will hold the response returned by Salesforce.

KEY-VALUE

<salesforce_connection> 

is the name of the Salesforce connection.

TEXT

<salesforce_module>

is the name of the module in Salesforce where the record will be updated.

Following are the names of applicable modules.

Lead

Account

Contact

Case
SolutionProduct   Campaign
TEXT

<record_ID>

ID of the record which will be updated.

Learn how to fetch the ID of a record after creating it or fetching it.

TEXT
<data_map>

Map with key as Salesforce field's name and value as the updated value.

To learn about the field names, click here and navigate to the required module.

KEY-VALUE

Update records in Salesforce

The following snippet when executed updates the record in the "Account" module in Salesforce. 

response = salesforce.sales.update("Salesforce", "Account", "00190000010bRIMAA2", {"AnnualRevenue" : 1000, "Industry" : "Chemicals"});

where,

ParameterDescription
"Salesforce"is the name of the Salesforce Connection
"Account"is the module in Salesforce, where the record will be updated
"00190000010bRIMAA2​"is the ID of the record which needs to be updated
"Annual Revenue"
"Industry"
are the Salesforce fields which will be updated
1000
"Chemicals"
are the updated values for the specified fields
responseis response returned as map by Salesforce

Response Format

Following is a sample success response returned by Salesforce:

{  
   "done":true
}

The following is a sample failure response:

{  
   "message":"Cannot deserialize instance of currency from VALUE_STRING value thousand at [line:1, column:2]",
   "errorCode":"JSON_PARSER_ERROR"
}

Related Links

Get Started Now

Execute