Fetch records from Salesforce
Fetch records from Salesforce using this task.
Note: This task is applicable only to Zoho Creator.
is the variable which will hold the response returned by Salesforce.
is the name of the Salesforce connection.
is the name of the module in Salesforce from where the records will be fetched.
Following are the names of applicable modules.
Criteria based on which the records will be fetched.
The criteria must be in the format "<field name> = '<value>'". For example, "Name = 'Henry'"
Field names whose values will be included in the fetched records.
The following snippet when executed fetches records based on the specified criteria from the "Account" module in Salesforce, containing values only for the specified fields.
response = salesforce.sales.getRecords("Salesforce", "Account", "Name = 'Henry'", fieldList);
|"Salesforce"||is the name of the Salesforce Connection|
|"Account"||is the module in Salesforce, from where the records will be fetched|
|"Name = 'Henry'"||is the criteria based on which the records will be fetched|
|"fieldList"||is a list variable which holds the list of field names whose values must be returned in the response|
|response||is response returned as map by Salesforce|
Following is a sample success response returned by Salesforce:
You can fetch the record IDs from the response using the following snippet:
for each var1 in var
The following is a sample failure response, due to incorrect query:
"message":"\nSELECT * FROM Account where Name='John'\n ^\nERROR at Row:1:Column:7\nunexpected token: '*'",