Zoho CRM custom function: Creating a potential for a contact

In Zoho CRM, we can create a potential upon lead conversion to Contact or Account. Sometimes it may require to create a potential after performing some sales activities on ‘Contacts’ as per business logic. Although we can create a potential for a existing contact using quick action link, we can automate this using workflow rule. To do this need to set a workflow rule for ‘Contacts’ module on field update or edit action. Use following custom functions to be attached to that workflow rule:

Custom function

Contact_id=input.ConID.toString();
rec = zoho.crm.getRecordById("Contacts",input.ConID);
potentialmap=map();
potentialmap.put("Potential Name",((((rec.get("First Name")) + " ") + rec.get("Last Name")) + " ") + rec.get("Provider"));
potentialmap.put("Closing Date",zoho.currentdate.addDay(30));
potentialmap.put("Stage","New");
potentialmap.put("Contact Name",((rec.get("First Name")) + " ") + rec.get("Last Name"));
ResCRM = zoho.crm.create("Potentials",potentialmap);

 

Hope, this would helps someone.

Leave a Comment

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

*
*