Get Record By ID

Getting Record by ID

Every record in Zoho CRM has a unique ID. If you know a record's ID, you can pull all of its information  by using the invokeConnector() task. When you use this task, CRM will respond with the record's information formatted in JSON.

Syntax

<crmResponse> = zoho.crm.invokeConnector("crm.get", <details map>);

where,
<details map> This is the ID of the CRM record you're looking for.
<crmResponse> is the map variable returned by CRM as response.

Example

lead_id = input.lead.get("Leads.ID");
m = {"module":"Leads", "id": lead_id};
resp = zoho.crm.invokeConnector("crm.get", m);

 Response from CRM

{"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}

Note:

 Related Links

https://www.zoho.com/crm/help/api/getrecordbyid.html 

Share this post :

FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohodeveloper.com