Zoho CRM provides a powerful API that facilitates integrating CRM with many third party applications. The searchRecords API helps retrieve the records that match a specific criteria. Every record in CRM will have a unique Record ID that gets parsed into the URL while accessing the record. Some of our customers wanted to use the searchRecords API using the Lead ID. Take for example, having a Zoho Creator form that could fetch the required details from the record when the Lead ID is entered. However, the catch is the Lead ID is not stored in the record and hence this can’t be achieved out-of-the-box. This week’s hack helps address this requirement by making use of a custom function. Using custom function, we’ll update the Record ID in the Lead record.
Steps to update the Record ID of the Leads in a single line field Named “Lead ID” :
Setup ->Automation -> Actions ->custom functions - >Configure Custom Function -> write your own ->
1) choose module as 'potential'
2)Give custom function name and click on 'free flow scripting'
3) copy and paste the code below
leadIdStr = input.leadId.toString();
mp=map();
mp.put(“Lead ID“,input.leadId);
update=zoho.crm.updateRecord(“Leads”, leadIddStr, mp);
info mp;
info update;
a) choose potential id - name it as ‘leadId’
Writer is a powerful online word processor, designed for collaborative work.