Search Records in Zoho CRM
Table of Contentsup
Overview
Zoho Creator and Zoho CRM have been integrated for efficient usability purposes. We have developed tasks in Zoho Creator to perform automatic actions in Zoho CRM, which would otherwise require manual execution. For example, you can search for records in Zoho CRM by specifying a criteria and populate them in Zoho Creator Form fields for further action. You can specify the Module Name in which you want to search the records along with the optional start and end index numbers. This can be achieved using zoho.crm.v1.searchRecords() task in Zoho Creator.
Use Case Scenario
Let's say we need to fetch all records having email id as john@zillum.com from a custom module. This can be achieved by using the searchRecords()task with the specified criteria and module name. Further details on how to execute this task are explained below.
Syntax
<response>=zoho.crm.v1.searchRecords(<module_name>, <criteria>, [<from_index>],[<to_index>]);
where,
| Params | Description | ||||||||||||
<response> | is the response returned asLISTby Zoho CRM. | ||||||||||||
<module_name> | is the name of the CRM module, ofSTRINGdatatype, where the records will be searched for. Following is the list of supported modules.
| ||||||||||||
<criteria> | is a conditional statement of the following format: (<colName> | <operator> | <colValue>). The <colName> stands for the CRM field label name and <colValue> stands for it's respective value. The <operator> can contain the following:
Note:
| ||||||||||||
<from_index> (optional) | is the starting index of the recordsthat need to be fetched. It is of NUMBERdatatype. | ||||||||||||
<to_index> (optional) | is the last index of the recordsthat need to be fetched. It is of NUMBERdatatype. |
Note:
- If only fromIndex is mentioned, 20 records will be fetched starting from mentioned startIndex.
- If only toIndex is mentioned, 20 records will be fetched ending with specified toIndex.
- If both are not mentioned, first 20 records will be fetched.
- At any given time, a maximum of 200 records can be fetched.
Example 1: Search records with a specific email address in a Custom Module
Let's say we need to fetch all records having email address as john@zillum.com from a Custom Module named CustomModule1. To achieve this, add the following script in the required Form Actions block of your Zoho Creator Form:
response=zoho.crm.v1.searchRecords("CustomModule1", "(Email|=|john@zillum.com)");
where,
response"CustomModule1""(Email|=|john@zillum.com)"
Example 2: Search Accounts which start with a specific letter
Let's say we need to fetch all Accounts which start with the letter "A". To achieve this, add the following script in the required Form Actions block of your Zoho Creator Form:
response=zoho.crm.v1.searchRecords("Accounts", "(Account Name|starts with|A*)");
where,
response"Accounts""(Account Name|starts with|A*)"
Response Format
The response returned is of the following format:
"SIC Code":"0",
"Account Owner":"Test",
"Employees":"0",
"Account Name":"Test",
"Account Number":"0",
"Created By":"Test",
"ACCOUNTID":"231356000000043001","MODIFIEDBY":"231356000000034003",
"Annual Revenue":"0",
"Created Time":"2010-07-06 10:15:01",
"Modified By":"Test",
"SMOWNERID":"231356000000084003",
"SMCREATORID":"231356000000034003",
"Modified Time":"2011-11-21 10:00:14"
}
