Get Record By ID from Zoho People
Table of Contents
Note:
- Each time the zoho.people.getRecordById 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.people.getRecordById 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
The zoho.people.getRecordById task is used to fetch a record from the specified Zoho People form using its ID.
Syntax
<response> = zoho.people.getRecordById(<form_name>, <record_id>, [<connection>]);
where:
| Params | Data type | Description |
| <response> | KEY-VALUE | The details of the record that will be fetched. |
| <form_name> | TEXT | The label name of the form from which the records need to be fetched. Note: Click here for the instructions to get the form label names in Zoho People. |
| <record_id> | NUMBER | The ID of the record that needs to be fetched. Note: Learn how to get the ID of a record after fetching and creating it. |
<connection> (optional)* | TEXT | The name of the connection. *Note: This param is not applicable to Zoho Creator and mandatory in Zoho Cliq. |
Example
The following script fetches the record with ID - 4163000000170001 from the form - Employee in Zoho People
response = zoho.people.getRecordById("P_Employee", 4163000000170001);
where:
"P_Employee"
4163000000170001
Response Format
Success Response
The success response will be returned in the following format:
{
"Current_Job_Description":"",
"EmailID":"richard@zohocorp.com",
"CreatedTime":"1500373226190",
"Address":"",
"Date_of_birth":"",
"Dateofexit":"",
"Photo":"https://contacts.zoho.com/file?ID=-1&fs=thumb",
"Marital_status":"",
"Gender":"",
"Other_Email":"",
"ApprovalStatus":"Approval Not Enabled",
"Work_location":"",
"LocationName":"",
"Department":"",
"Nick_Name":"",
"ModifiedTime":"1500373226190",
"Reporting_To.MailID":"",
"Zoho_ID":"4163000000170001",
"LocationName.ID":"",
"Designation.ID":"",
"tabularSections":"{\"Education\":[{\"Specialization\":\"\",\"Education_AdditionalNotes\":\"\",\"Degree\":\"\",\"College\":\"\",\"Yearofgraduation\":\"\",\"Interests\":\"\"}],\"Work experience\":[{\"Jobtitle\":\"\",\"Employer\":\"\",\"Previous_JobDesc\":\"\",\"FromDate\":\"\",\"Todate\":\"\"}],\"Dependent\":[{\"DependentDOB\":\"\",\"Name\":\"\",\"DependentRelationship\":\"\"}]}",
"Source_of_hire":"",
"Tags":"",
"Reporting_To":"",
"Photo_downloadUrl":"https://contacts.zoho.com/file?ID=-1&fs=thumb",
"Designation":"",
"FirstName":"Richard",
"Dateofjoining":"",
"AboutMe":"",
"Mobile":"",
"Employeestatus":"Inactive",
"Extension":"",
"Role":"Team member",
"Employee_type":"",
"Reporting_To.ID":"",
"Work_phone":"",
"Role.ID":"4163000000019635",
"LastName":"Patrick",
"Department.ID":"",
"EmployeeID":"12311",
"Expertise":""
}
Failure Response
The failure response for incorrect or non-existent form name will be returned in the following format:
{
"response": {
"message": "Error occurred",
"uri": "/api/forms/PEmployee/getDataByID",
"errors": {
"code": 7011,
"message": "Form name 'PEmployee' is invalid"
},
"status": 1
}
}The failure response for incorrect or non-existent record ID will be returned in the following format:
{
"response": {
"message": "Error occurred",
"uri": "/api/forms/P_Employee/getDataByID",
"errors": {
"code": 7049,
"message": "No record available with the specified record ID"
},
"status": 1
}
}