Deluge Help

Get Records by ID from Salesforce

Table of Contents


The salesforce.sales.getRecordById()task is used to get records from any of the supported modules in your Salesforce account, by specifying the unique ID of the record. For example, you can get a Leads record from the Leads module in Salesforce with the given record ID. To connect Zoho Creator with Salesforce, create a new connection from the Setup - Connections page.

 Supported Modules

  • Lead
  • Contact
  • Account
  • Case
  • Solution
  • Product
  • Campaign


<salesforceResponse> = salesforce.sales.getRecordById(<salesforceConnectionName>, <salesforceModuleName>, <recordID>);

<salesforceResponse> is the map variable returned by Salesforce as response. It contains the details of the fetched record.
<salesforceConnectionName> referes to the connection name used to connect Zoho Creator with Salesforce. Create a new connection from the Setup - Connections page.
<salesforceModuleName> refers to the module name in Salesforce from where the record is fetched.
<recordID>is the ID of the record in Salesforce that needs to be fetched.


A sample script to get a record from the Salesforce Accounts module with a given record ID is given below. You can execute this script from a Zoho Creator form by adding it to the required workflow section. For example, to fetch a record from the accounts module, based on the recordID,

salesforceResonse = salesforce.sales.getRecordById("Zoho", "Account", "00190000010bRIMAA2");
//returns a list of records with recordID = "00190000010bRIMAA2"

 Response Format

The response returned by Quickbooks will be in the format given below.

{ "UpsellOpportunity__c":null,
"attributes":"{" type":"Account",

If the execution fails due to Malformed Query, the response will be in the following format:

"message":"\nSELECT * FROM Account where Name='John'\n ^\nERROR at Row:1:Column:7\nunexpected token: '*'",

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: