Get Related Record
Purpose
To get a list of records related to a specific record using Widget API.
Request Format
ZOHO.RECRUIT.API.getRelatedRecord({
"Entity": "{module_api_name}",
"RecordID": "{record_id}",
"RelatedList": "{related_module_name}"
});
module_api_name - The API name of the module
record_id - The unique id of the record
related_module_name - The API name of the related module
Parameters
Parameter Name | Data Type | Description | Possible Values |
---|---|---|---|
ids (optional) | String | To list the related records of the record with said ID | Related record ids, comma-separated. For example: [100001000000023101,100001000000023102] |
sort_order (optional) | String | To sort the available list of records in either ascending or descending order | asc - ascending order desc - descending order |
sort_by (optional) | String | To sort the available list of records based on the given field | Field API name Example: Email |
page (optional) | Integer | To get the list of records from the respective pages. The default value for the page is 1. | Positive Integer values only |
per_page (optional) | Integer | To get the list of records available per page. The default value for the page is 200. | Positive Integer values only |
fields (optional) | String | To list all the module records with respect to fields | Multiple field API names, comma-separated. |
Sample Request
CopiedZOHO.RECRUIT.API.getRelatedRecord({
"Entity": "Candidates",
"RecordID": "14501000001948049",
"RelatedList": "Attachments"
}).then(function(successResponse) {
}, function(errorResponse) {
});
Sample Response
Copied{
"data": [
{
"Modified_Time": "2020-08-14T08:04:37+02:00",
"File_Name": "Live Interview.ics",
"Size": "394",
"Created_Time": "2020-08-14T08:04:37+02:00",
"Parent_Id": "100001000000023096",
"$editable": true,
"Attachment_Owner": {
"name": "Patricia Boyle",
"id": "100001000000021266"
},
"$file_id": true,
"$type": "Attachment",
"$se_module": "Interviews",
"Modified_By": {
"name": "Patricia Boyle",
"id": "100001000000021266"
},
"id": "100001000000023101",
"Created_By": {
"name": "Patricia Boyle",
"id": "100001000000021266"
},
"$link_url": null
}
],
"info": {
"per_page": 200,
"count": 1,
"page": 1,
"more_records": false
}
}