Search Records in Zoho CRM
Table of Contentsup
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.searchRecords() task in Zoho Creator.
Use Case Scenario
Let's say we need to fetch all records having email id as firstname.lastname@example.org 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.
<response>=zoho.crm.searchRecords(<module_name>, <criteria>, [<from_index>],[<to_index>]);
is the response returned as LIST by Zoho CRM.
is the name of the CRM module, of STRING datatype, where the records will be searched for. Following is the list of supported modules.
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:
is the starting index of the records that need to be fetched. It is of NUMBER datatype.
is the last index of the records that need to be fetched. It is of NUMBER datatype.
- 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.
Let's say we need to fetch all records having email address as email@example.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:
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.searchRecords("Accounts", "(Account Name|starts with|A*)");
"(Account Name|starts with|A*)"
The response returned is of the following format:
"Created Time":"2010-07-06 10:15:01",
"Modified Time":"2011-11-21 10:00:14"
CRM Tasks can be executed only in accounts which are under Flexible and Unlimited Plans. Accounts under Free Plan, kindly upgrade to use CRM tasks. For more details scroll down to Integration and Web Data on the pricing page.
You can also make use of Script builder to define the zoho.crm.searchRecords() task. Navigate to your application’s Workflow and drag and drop the Call Function under Deluge Tasks > Miscellaneous. Select Integration tasks and fill out necessary information.