Getting Record by ID
Table of Contents
Every record created in an Extensions or Vertical Solution has a unique ID. If you know a record's ID, you can pull all of its information by using the zoho.crm.getRecordById() deluge task. Using this task, you can obtain the record's information in JSON format.
Syntax
<Response> = zoho.crm.getRecordById(<module String>,<recordID Long>);
where,
<Response> is the task response returned as a Map.
Parameters
Name | Datatype | Description | Mandatory |
module | String | Specify the API name of the module from which you want to fetch the record. | Yes |
recordID | Long | It is the unique ID of the record you want to retrieve. | Yes |
Example
Fetch a Lead record whose ID is obtained as user input.
leadId = lead.get("Leads.ID");
response = zoho.crm.getRecordById("Leads", leadId);
info response;
Response Format
{"response":"{\"data\":[{\"Company\":\"Automation Pvt Ltd\",\"Email\":null,\"Description\":null,
\"Rating\":null,\"Website\":null,\"Twitter\":null,\"Salutation\":\"\",
\"Last_Activity_Time\":\"2017-01-09T12:17:33+05:30\",\"First_Name\":null,\"Lead_Status\":null,
\"Industry\":null,\"Full_Name\":\"2\",\"Modified_By\":{\"name\":\"ZohoPlatform \",
\"id\":\"1297376000000094003\"},\"Skype_ID\":null,\"$process_flow\":false,\"$converted\":false,
\"Phone\":null,\"Street\":null,\"Zip_Code\":null,\"id\":\"1297376000000292005\",
\"Email_Opt_Out\":false,\"$approved\":true,\"Designation\":null,\"$approval\":{\"delegate\":false,
\"approve\":false,\"reject\":false},\"Modified_Time\":\"2017-01-09T12:17:33+05:30\",
\"Created_Time\":\"2017-01-09T12:16:42+05:30\",\"$converted_detail\":{},\"$followed\":false,
\"Lead_Owner\":{\"name\":\"ZohoPlatform \",\"id\":\"1297376000000094003\"},\"City\":null,
\"No_of_Employees\":0,\"Mobile\":null,\"Last_Name\":\"2\",\"State\":null,\"Lead_Source\":null,
\"Country\":null,\"Created_By\":{\"name\":\"ZohoPlatform \",\"id\":\"1297376000000094003\"},
\"Fax\":null,\"Annual_Revenue\":0,\"Secondary_Email\":null}],\"info\":{}}","status_code":200}