If you have been writing your own deluge script on Zoho CRM, you may have noticed that only the fields that has the value will show up on the pop up box when trying to run your code using an "info" function. That function that you have been using with the "info" to show information probably is now an old custom function code. Zoho CRM has continued to improve their services not only towards customers but as well as on their Consultants and Developers. Today, I will be showing you the comparison between the old code (v1) and the new code (v2) which they just recently released from their update.
Some of the old function name(s) vs new:
v1 Function |
v2 Function |
- _getRelatedRecords_create
- _getRecords
- _updateRecord
- _serchRecordsByPDC
- _getRecordById
- _searchRecords
|
- getRelatedRecords
- create
- getRecords
- update
- getRecordById
- searchRecords
- bulkCreate
- invokeConnector
- convertLead
- getOrgVariable
- updateRelatedRecord
- upsert
- bulkUpdate
|
(v1) "_getRecordyById" and (v2) "getRecordById" comparison:
As you can notice on the result from the function using v1, it shows only the fields which contains value. Unlike on v2, which shows all of the fields with or without value.
v1 Function
res-v1 = zoho.crm._getRecordById ("Leads",1400232000002475006);
info res-v1;
Result is:
|
v2 Function
resv2 = zoho.crm.getRecordById ("Leads",1400232000002475006);
info resv2;
Result is:
|
{
"Email Opt Out": "false",
"Company": "Yutechs, LLC",
"Email": "clark@yutechs.com",
"Inquiry For": "Webform Integration",
"MODIFIEDBY": "1400232000000083001",
"First Name": "Clark",
"Full Name": "Clark Test",
"SMCREATORID": "1400232000000083001",
"LEADID": "1400232000002475006",
"SMOWNERID": "1400232000000083001",
"Mobile": "1234567890",
"Annual Revenue": "0",
"Modified Time": "2018-04-25 05:39:22",
"Created Time": "2018-04-25 05:38:40",
"Modified By": "James CRMDev2",
"Lead Owner": "James CRMDev2",
"Last Activity Time": "2018-04-25 05:39:22",
"Created By": "James CRMDev2",
"Last Name": "Test",
"No of Employees": "0"
}
|
{
"Owner": {
"name": "James CRMDev2",
"id": "1400232000000083001"
},
"Company": "Yutechs, LLC",
"Email": "test@yutechs.com",
"Description": null,
"$currency_symbol": "$",
"Rating": null,
"Website": null,
"Twitter": null,
"Salutation": null,
"Last_Activity_Time": "2018-04-25T05:39:22-07:00",
"First_Name": "Clark",
"Full_Name": "Clark Test",
"Lead_Status": null,
"Industry": null,
"Modified_By": {
"name": "James CRMDev2",
"id": "1400232000000083001"
},
"Skype_ID": null,
"$converted": false,
"$process_flow": false,
"Phone": null,
"Street": null,
"Zip_Code": null,
"id": "1400232000002475006",
"Email_Opt_Out": false,
"$approved": true,
"Designation": null,
"Inquiry_For": "Webform Integration",
"$approval": {
"delegate": false,
"approve": false,
"reject": false,
"resubmit": false
},
"Modified_Time": "2018-04-25T05:39:22-07:00",
"Created_Time": "2018-04-25T05:38:40-07:00",
"$converted_detail": {
},
"$followed": false,
"$editable": true,
"City": null,
"No_of_Employees": 0,
"Mobile": "1234567890",
"Last_Name": "Test",
"State": null,
"Lead_Source": null,
"Country": null,
"Tag": [
],
"Created_By": {
"name": "James CRMDev2",
"id": "1400232000000083001"
},
"Fax": null,
"Annual_Revenue": 0,
"Secondary_Email": null
}
|
//Get field value example:
strCompany1= resv1.get("Company");
strOwnerID1= resv1.get("SMOWNERID");
strOwnerName1 = resv1.get("Lead Owner");
|
//Get field value example:
strCompany2= resv2.get("Company");
strOwnerID2= resv2.get("Owner").get("id");
strOwnerName2 = resv2.get("Owner").get("name");
|
|