在 Zoho Recruit 中搜索记录

 概述

可执行 zoho.recruit.searchRecords() 任务以基于指定的条件从 Zoho Recruit 的任何受支持模块搜索和检索现有记录。通过将它放入 Zoho Creator 中所需的表单动作块,从 Zoho Recruit 搜索和检索记录的过程可以根据需求轻松地实现自动化。假设我们有一个 Zoho Creator 表单,您需要从这里基于搜索条件检索 Zoho Recruit 的记录以供采取进一步动作,例如对它们进行迭代。您可以在所需的表单动作块执行 zoho.recruit.searchRecords() 任务,它将返回包含映射格式记录的响应。有关如何执行此任务的更多详情在下面说明。

 支持的模块

  • 应聘者
  • 职位空缺
  • 客户
  • 客户联系人

 语法

response = zoho.recruit.searchRecords(moduleName, searchCondition, fromIndex, toIndex, selectColumns)

其中,
<response> - 是作为响应由 Zoho Recruit 返回的映射变量。
<moduleName> - Zoho Recruit 中的模块名称,记录将从这里提取。(必填)
<searchCondition> 必需是以下格式:(<colName> |<operator>|<colValue>)。您可以在条件中指定以下表达式:(必填)

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

<fromIndex> - 是需要检索的记录的开始索引。
<toIndex> - 是需要检索的记录的末尾索引。

 示例

下面是一个示例脚本,可添加到 Zoho Creator 表单中以便从 Zoho Recruit 搜索和检索现有记录。假设我们有一个 Creator 表单,我们需要基于搜索条件从 Zoho Recruit 将记录提取到该表单中以执行迭代。您可以将以下脚本添加到 Creator 表单中的所需表单动作块,以便每当加载、编辑或提交此表单时,Zoho Recruit 的指定模块中的现有记录会相应地搜索和检索。在本例中,模块是“应聘者”。当执行以下脚本时,来自 Zoho Recruit 的记录将依照指定的搜索条件来搜索和提取。

response = zoho.recruit.searchRecords("Candidates", "(Industry|=|Chemicals)", "2", "5");

其中,
response - 是作为响应由 Zoho Recruit 返回的映射变量。
Candidates - 将要从中搜索和检索记录的 Zoho Recruit 模块名称。
(Industry|=|Chemicals) 是条件,系统将基于该条件在 Zoho Recruit 中搜索记录。
2 是将要提取的记录的开始索引。
5 是将要提取的记录的末尾索引。

 响应

Zoho Recruit 作为映射返回的响应:

{"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":"deepika.p"},{"Is Locked":"false","Candidate ID":"ZR_25_CAND","CANDIDATEID":"1687000000102053","Is Unqualified":"false","Updated On":"2015-08-05 18:49:51","Created By":"deepika.p","Is Attachment Present":"true","Source":"Resume","MODIFIEDBY":"1687000000077003","Created Time":"2015-08-05 18:49:51","Modified By":"deepika.p","SMOWNERID":"1687000000077003","Candidate Status":"New","Last Activity Time":"2015-08-05 18:49:51","SMCREATORID":"1687000000077003","Email Opt Out":"false","Is Hot Candidate":"false","Last Name":"No name","Experience in Years":"0","Candidate Owner":"john"}