Search Records

Searching Records

You can search records in Zoho CRM using the invokeConnector() Deluge task.

Syntax

<CRM Response>= zoho.crm.invokeConnector("crm.search", <Module & Criteria map>);

where,
<CRM Response> is the map variable returned by CRM as response.
<Module & Criteria values> is the map variable that holds the key, value pairs. The two mandatory keys are "module" and "criteria".

A brief description of the keys are given below.

KeyDatatypeDescription
moduleStringSpecify the module's API name in which you want to perform the search.
criteriaStringProvide the search criteria in string format as
("Account_Name:starts_with:") + "A"
Use the API name of the column (Account_Name) which will be used in the search criteria. The Field API name can be referred from the right side listing of the Deluge Script Editor.

Example

For example, the below script performs a search for an Account by the name 'Acme'.

myFieldMap = map();
myFieldMap.put("module", ("Accounts"));
myFieldMap.put("criteria", ("Account_Name:equals:") + "Acme");
response = zoho.crm.invokeConnector("crm.search", myFieldMap);
info response;

Function explanation:

  • Using crm.search in invoke connector task helps us to perform a search within a module in CRM.
  • starts_with and equals are the search criteria that can be used on the column names.
  • response stores the result of the action (success or failure with details of the records retrieved for the search).
  • The maximum number of records that will be fetched for the search is 200.

 Response Format

{"response":"{\"data\":[{\"Owner\":{\"name\":\"Latha Velu\",\"id\":\"3053895000000139011\"},
\"Ownership\":null,\"Description\":null,\"$currency_symbol\":\"$\",\"Account_Type\":null,\"Rating\":null,
\"SIC_Code\":null,\"Shipping_State\":null,\"Website\":null,\"Employees\":null,\"Last_Activity_Time\":null,
\"Industry\":null,\"Modified_By\":{\"name\":\"Latha Velu\",\"id\":\"3053895000000139011\"},\"Account_Site\":null,
\"$process_flow\":false,\"Phone\":null,\"Billing_Country\":null,\"Account_Name\":\"Acme\",\"id\":\"3053895000000164041\",
\"Account_Number\":\"0\",\"$approved\":true,\"Ticker_Symbol\":null,\"$approval\":{\"delegate\":false,\"approve\":false,
\"reject\":false,\"resubmit\":false},\"Modified_Time\":\"2018-03-06T14:55:01+05:30\",\"Billing_Street\":null,
\"Created_Time\":\"2018-03-06T14:55:01+05:30\",\"$followed\":false,\"$editable\":true,\"Billing_Code\":null,
\"Parent_Account\":null,\"Shipping_City\":null,\"Shipping_Country\":null,\"Shipping_Code\":null,\"Billing_City\":null,
\"Billing_State\":null,\"Tag\":[],\"Created_By\":{\"name\":\"Latha Velu\",\"id\":\"3053895000000139011\"},\"Fax\":null,
\"Annual_Revenue\":null,\"Shipping_Street\":null}],\"info\":{\"per_page\":200,\"count\":1,\"page\":1,\"more_records\":false}}",
"status_code":200}

 Related Links

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

Share this post : FacebookTwitter

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

Write to us: support@zohodeveloper.com