Search Records
Table of Contents
Note:
- Each time the zoho.fsm.searchRecordsByField() integration task is executed, it triggers an API request in the back-end. This call is deducted from the external calls limit available for the service from which the task is executed, based on your pricing plan.
- Only actual executions that receive a response (whether success or failure) are counted, not the number of times the task appears in the script. For example, if zoho.fsm.searchRecordsByField() integration task is placed inside a for each task that iterates five times, the number of external calls consumed will be five, even though the task appears only once in the script.
Overview
You can search records of a module using the zoho.fsm.searchRecordsByField() Deluge task.
Note: This task is not applicable to Zoho Creator.
Syntax
<variable> = zoho.fsm.searchRecordsByField(<module_name>, <field_name>, <search_string>, <optionalDataMap>, <connection>);
where,
| Params | Data type | Description |
| <variable> | KEY-VALUE | is the task response returned as a map |
| <module_name> | TEXT | specifies the API name of the module whose records you want to search Refer to the table Supported Modules and Fields on this page to know about the API name of the modules that support search |
| <field_name> | TEXT | is the API name of the field based on which you can search records Refer to the table Supported Modules and Fields on this page to know about the API name of the fields based on which you can search records. |
| <search_string> | TEXT | a value with which you want to perform the search |
| <optionalDataMap> | KEY-VALUE | is the parameter to pass any additional values. Note:
|
| <connection> | TEXT | is the connection created for Zoho FSM Note: Add relevant scopes as mentioned here. |
Example: Search records from the Contact module
The following script fetches the first record from the Zoho FSM Contacts module that matches the search for Last Name as Robins.
response = zoho.fsm.searchRecordsByField("Contacts","Last_Name","Robins",{"page":1,"per_page":1}, "fsm"); info response;
where:
"Contacts""Last_Name"
"Robins"
{"page":1,"per_page":1}"fsm"Response Format
{"data":[{"Company":null,"Owner":{"name":"Mary Cooper","id":"1439000000161001","email":"betty@zylker.com"},"Email":"l.robins@zylker.com","$currency_symbol":"$","Config":null,"Tax":{"Tax_Authority_Id":null,"Tax_Percentage":7,"Tax_Exemption_Code":null,"Tax_Authority":null,"Tax_Id":"3219741000000078015","Tax_Name":"SalesTax","Tax_Exemption_Id":null,"Taxable":true},"ZBilling_Id":"3219741000000196001","Salutation":"Ms.","First_Name":"Lucy","Full_Name":"Ms. Lucy Robins","Modified_By":{"name":"Mary Cooper","id":"1439000000161001","email":"betty@zylker.com"},"Exchange_Rate":1,"Phone":"111-111-1111","Currency":"USD","$inactive":false,"Service_Address":null,"id":"1439000000505113","Modified_Time":"2023-04-19T14:43:37+05:30","Created_Time":"2023-04-19T14:43:37+05:30","Designation__C":null,"$editable":true,"Mobile":null,"$permissions":{"read":true,"edit":true,"delete":true},"ZBooks_Contact_Person":false,"Last_Name":"Robins","Billing_Address":null,"SecondaryEmail__C":null,"Created_By":{"name":"Mary Cooper","id":"1439000000161001","email":"betty@zylker.com"}}],"info":{"per_page":1,"count":1,"page":1,"more_records":true}}