Creator Help

Search records in CRM

Search Records in CRM By Selected Columns

The zoho.crm.searchRecords() method enables you to search records in CRM by expressions of the selected columns.

Syntax

<variable>= zoho.crm.searchRecords("<moduleName >", "<criteria>", fromIndex, toIndex);

where,

<moduleName> refers to the name of the CRM module

<criteria> must be in the following format: ( <colName> | <operator> | <colValue> )

Regular Expressions

You can specify the following expressions in the criteria :

  • is OR =
  • isn't OR <>
  • contains(*srcString*)
  • starts with(srcString*)
  • ends with(*srcString)
  • doesn't contain
  • < OR is before
  • > OR is after
  • <=
  • =>

Example

crmResp = zoho.crm.searchRecords("Leads", "(Email|=|test@zohocorp.com)");

crmResp = zoho.crm.searchRecords("Accounts","(Account Name|starts with|A*)");

Response 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"
}

Using Script Builder

You can define the searchrecords() task using Script Builder by following the steps given below:

  1. Drag and drag the Call function to the builder area and select Integration Tasks.
  2. Select the Service as Zoho CRM and the function as searchrecords.
  3. The CRM Module Name lists all the CRM modules. Select the required module from which the record will be searched.
  4. Specify the Criteria to search the records. Currently the script builder does not support displaying the CRM field names for selection.
  5. Specify the From/To index. The default value of From index is 1 and To index is 20. The maximum value of To index is 200.
  6. Specify the CRM Response Variable and click Done to add the task to the script builder.
  7. Click Save Script to add the script.

Related Links

http://www.zoho.com/crm/help/api/getsearchrecords.html

Top