Search records in Zoho Recruit
Table of Contents
Overview
The zoho.recruit.searchRecords task is used to search and fetch required records from Zoho Recruit. This task is based on the Zoho Recruit API - GetSearchRecords.
Syntax
<variable> = zoho.recruit.searchRecords(<module_name>, <searchCondition>, <fromIndex>, <toIndex>, <selectColumns>, <connection>);
where:
Parameter | Data type | Description |
<variable> | LIST | The response returned by Zoho Recruit. |
<module_name> | TEXT | The module in which the records will be searched. Applicable modules:
|
<searchCondition> | TEXT | The condition based on which the records will be fetched. Note:
|
<fromIndex> | NUMBER | The starting index of the records that will be retrieved. |
<toIndex> | NUMBER | The last index of the records that will be retrieved. Note: Using <fromindex> and <toindex> params you can fetch upto 200 records. So, if the difference between the <fromindex> and <toindex> exceeds 200, only the first 200 records will be fetched. |
<selectColumns> | TEXT | Field names whose values will be included in the fetched records. Multiple column names can be specified each separated by a comma and enclosed in brackets. Eg: (Last Name,Website,Email) If this param is supplied with ALL or an empty value, all field values will be included in the fetched records. Note: The field names should be provided as specified in the Zoho Recruit API document. |
<connection> | TEXT | The link name of the Zoho Recruit connection. Note:
|
Fetch records from Candidates module by specifying a criteria
The following script fetches records from the "Candidates" module, based on the specified criteria, fromIndex, toIndex and selected columns in Zoho Recruit.
response = zoho.recruit.searchRecords("Candidates", "State|=|California", 1, 3, "Last Name,Email");
where:
"Candidates"
"State|=|California"
1
3
"Last Name,Email"
Response Format
Success Response- The success response will be returned in the following format:{
"Email":"john@zylker.com",
"CANDIDATEID":"3342000000267001",
"Last Name":"Richard"
}
To get the IDs of the records returned, execute the following script:
for each rec in <response> { info rec.get("<MODULENAME>ID"); // example for <MODULENAME> is CANDIDATE and example for <MODULENAME>ID is CANDIDATEID }
- The failure response for invalid or incorrect parameter will be returned in the following format:{
"message":"Invalid parameter value",
"code":"4832"
}