Fetch Records from Zoho Recruit

 Overview

The zoho.recruit.getRecords() task can be executed to retrieve existing records from any of the supported modules of Zoho Recruit. By placing it in the required form actions block of Zoho Creator, the process of retrieving records from Zoho Recruit can easily be automated as per requirement. Lets say you have a Zoho Creator form where you need to retrieve records from Zoho Recruit for further action such as iterating them. You can execute zoho.recruit.getRecords() task in the required form actions block which will return the response containing the records in a map format. Further details on how to execute this task are explained below.

 Supported Modules

  • Candidates
  • Job Openings
  • Clients
  • Client Contacts

 Syntax

response = zoho.recruit.getRecords(moduleName, fromIndex, toIndex, selectColumns, sortColumnString, sortOrderString, lastModifiedTime)

where,
<response> - is the map variable returned by Zoho Recruit as response. 
<moduleName> - name of module in Zoho Recruit from where the records will be fetched. (mandatory)
<fromIndex> - is the starting index of the records that need to be retrieved. Default value is 1. If fromIndex and toIndex are not specified the above task will fetch a maximum of 20 records only otherwise it will fetch upto 200 records.
<toIndex> - is the last index of the records that need to be retrieved. Default value is 20. Maximum value allowed is 200.

 Example

Following is a sample script that can be added in a Zoho Creator form to retrieve existing records from Zoho Recruit. Let's say we have a Creator form where we need to fetch records from Zoho Recruit to perform an iteration. You can add the following script in required form actions block of the Creator Form so that whenever this form is loaded, edited or submitted etc, records existing in Zoho Recruit's specified module are retrieved accordingly. In this case, the module is "Candidates". When the following script gets executed, records from Zoho Recruit are fetched as specified by the index numbers. Using the following sample code, records from index number 2 to index number 9 are fetched(both inclusive).

response = zoho.recruit.getRecords("Candidates", "2", "9");

where,
response - is the map variable returned by Zoho Recruit as response. 
Candidates - name of module in Zoho Recruit where the record will be added.
2 is the starting index of the records that are going to be fetched.
3 is the last index of the records that are going to be fetched.

 Response

Response returned by Zoho Recruit as map:

{"Is Locked":"false","Candidate ID":"ZR_23_CAND","CANDIDATEID":"1687000000102009","Is Unqualified":"false","Updated On":"2015-08-05 18:41:34","Created By":"deepika.p","Is Attachment Present":"true","Source":"Resume","MODIFIEDBY":"1687000000077003","Created Time":"2015-08-05 18:41:34","Modified By":"deepika.p","SMOWNERID":"1687000000077003","Candidate Status":"New","Last Activity Time":"2015-08-05 18:41:34","SMCREATORID":"1687000000077003","Email Opt Out":"false","Is Hot Candidate":"false","Last Name":"No name","Experience in Years":"0","Candidate Owner":"deepika.p"},{"Is Locked":"false","Candidate ID":"ZR_24_CAND","CANDIDATEID":"1687000000102031","Is Unqualified":"false","Updated On":"2015-08-05 18:47:53","Created By":"deepika.p","Is Attachment Present":"true","Source":"Resume","MODIFIEDBY":"1687000000077003","Created Time":"2015-08-05 18:47:53","Modified By":"deepika.p","SMOWNERID":"1687000000077003","Candidate Status":"New","Last Activity Time":"2015-08-05 18:47:53","SMCREATORID":"1687000000077003","Email Opt Out":"false","Is Hot Candidate":"false","Last Name":"No name","Experience in Years":"0","Candidate Owner":"john"}