Get Record by ID
Table of Contents
Overview
This JS API task fetches the data of a specific record from a report. This record will be identified by the record ID that you supply in the request. Its response will contain the data from the quick view and detailed view of all the visible fields present in the record.
Request Details
Syntax
ZOHO.CREATOR.API.getRecordById(config).then(function(response){ //callback block });
Syntax Details
The syntax holds:
- <config> (object) - The configuration required to get a specific record from a report. This configuration includes the following parameters.
Name | Type | Description |
appName (Optional) | string | Link name of the application from which data needs to be pulled. Retrieve the link name using the Creator report's URL: https://creatorapp.zoho.com/<accountName>/<appName>/#Report:<reportName> Note: This parameter only needs to be passed when you need to pull data from other applications in the same Creator account. When not specified, data will be pulled from the current application. |
reportName | string | Link name of the report from which the record has to be fetched. Retrieve the link name using the Creator report's URL: https://creatorapp.zoho.com/<accountName>/<appName>/#Report:<reportName> |
id | string | Record ID of the record that needs to be retrieved. |
Possible Errors
Refer to this page for the complete list of error codes and messages.
Sample Input
Copiedvar config = {
appName : "zylker"
reportName : "All-Timesheet",
id : "2000000193171"
}
ZOHO.CREATOR.API.getRecordById(config).then(function(response){
console.log(response.data);
});
Sample Response
Copiedresponse = {
"code": 3000,
"data": {
"ID": "52129000000146011",
"Name": {
"first_name": "James",
"last_name": "Kyle",
"display_value": "James Kyle"
},
"Address": {
"address_line_1": "Dari Mart",
"address_line_2": "995 Hayden Bridge Rd",
"district_city" : "Springfield",
"state_province" : "Oregon",
"postal_code" : "97477",
"country" : "United States"
"latitude": "33.9307727",
"longitude": "-116.8767541",
"display_value": "Dari Mart, 995 Hayden Bridge Rd, Springfield, Oregon, United States"
},
"Rich_Text" : "The phone number is <b>+1541-726-4051</b>",
"Phone_Number": "+15417264051",
"Single_Line": "A simple one line text",
"Email": " james@zylker.com ",
"Number": "23",
"Decimal" : "1000.00",
"Percent": "60.00",
"Date_field" : "10-Jan-2020",
"Date_Time" : "23-Mar-2020 12:25:43 PM",
"Dropdown" : "Open",
"Radio" : "Closed",
"Multi_Select" : ["New", "Used"],
"Checkbox" : ["Refurbished", "Used"],
"File_Upload" : "/api/v2/zylker/Contacts/view/Contacts/635900380/Upload/download",
"Ur1": {
"value": "Dari Mart",
"url": " www.darimart.com",
"title": "Dari mart provisional store"
},
"Lookup_Single_Select" : {
"display_value" : "James - 4269",
"ID" : "521270000078464"
},
"Lookup_Multi_Select" : [{
"display_value" : "Door Step Delivery",
"ID" : "5212750000247932"
},
{
"display_value" : "Cash on Delivery",
"ID" : "5212750000564867"
}],
"Subform" : [{
"display_value" : "Service Equipment,New Order",
"ID" : "5212750000433263"
},
{
"display_value" : "Rotary Machine,Replacement",
"ID" : "5212750000090778"
}]
}
}
Show full
Show less