Copying ‘Contacts’ field value to ‘Potentials’ using Custom function in Zoho CRM

Sometimes it may require to update Potential field value by the related ‘Contacts’ data. We can do it using Workflow automation with Custom function. You may know, Custom function only supported in Zoho Enterprise edition. Anyway, we can set the trigger on record create or edit action based on necessity. Following code snippet was for copying ‘Date of Birth’ and ‘SSN’ number from Contacts to potential when a record is created in Potentials module.

Set the argument first , here’s a sample. In this case, we had email in Potential, that we used to find out the related contact directly.



After argument mapping, we need to retrieve the contact’s information that required to push in potentials. finally we need to update the potential. Here’s the sample code snippet-


Res=zoho.crm.searchRecordsByPDC("Contacts", "email", input.conemail).get(0);
dob=Res.get("Date of Birth");
crmRsp = zoho.crm.updateRecord("Potentials",input.billid.toString(),{ "DOB" : dob, "SSN4" : ssn });


Hope, this would help someone to get an idea at least! Please feel free to ask any question if you have.



Leave a Comment

Your email address will not be published. Required fields are marked *