Search records in Salesforce
Table of ContentsUp
Overview
Search records in Salesforce using a criteria.
Note: This task is applicable only to Zoho Creator.
Syntax
where,
Parameter | Description | Data 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 |
<criteria> | is the criteria based on which records will be searched. The criteria must be in the following format: "SELECT <columns_seperated_by_comma> FROM <module> WHERE <field>=<'value'>" The specified columns' values will be returned from the specified module from the records which meet the criteria. | TEXT |
Search records by criteria in Salesforce
The following snippet when executed searches for the record which meets the criteria, and returns the values for the specified columns, from the "Account" module.
where,
Parameter | Description |
"Salesforce" | is the name of the Salesforce Connection |
Name id | are the field names whose values will be returned. |
"Account" | is the module in Salesforce, where the records will be searched |
Industry='Chemicals' | is the criteria based on which the record will be fetched. |
Sample Response
Following is a sample success response returned by Salesforce:
"done":true,
"records":"[{" Name":"John",
"Id":"00190000010xPIuAAM",
"attributes {" type":"Account",
"url":"/services/data/v20.0/sobjects/Account/00190000010xPIuAAM"
}
}
]
The following is a sample failure response:
"message":"\nSELECT * FROM Account where Name='John'\n ^\nERROR at Row:1:Column:7\nunexpected token: '*'",
"errorCode":"MALFORMED_QUERY"
}