A custom function is a software code that can be used to automate a process and this allows you to automate a notification, call a webhook, or perform logic immediately after a workflow rule is triggered. This feature helps to automate complex tasks and calculations.
Let us consider the below use case from a customer -
With the integration between Zoho CRM & Zoho Projects, it is possible to associate a project with an Account/Contact/Lead only from CRM Interface but not from Projects Interface.
We received a specific requirement from a customer to associate a project with an Account in CRM from Projects Interface and we accomplished it using the combination of the following features
Steps to be followed :
How it works :
Just choose the Account name from the drop menu of the integration field. Automatically, project will be associated with that respective account in CRM
Script to be used:
//TODO: Create a connection for Zoho CRM service with the scopes "ZohoCRM.modules.ALL" to Replace ‘XXXXXX’ with the connection name. Link to learn about establishing the connection. Attached screenshots for reference.
if(accountDetails != null)
{
mp = Map();
mp.put("name",projectName);
datalist = List();
datalist.add(mp);
datamp = Map();
datamp.put("data",datalist);
resp = invokeurl
[
url :"https://www.zohoapis.com/crm/v2/Accounts/" + accountDetails.getPrefix("-") + "/Zoho_Projects/" + projectId
type :POST
parameters:datamp.toString()
connection:”XXXXXX”
];
}
return "success";
Creating custom functions in Zoho Projects is straightforward and well-documented. Zoho provides a range of built-in functions that you can use as a starting point, and you can also easily define your own functions using Zoho's scripting language, Deluge. Give it a try and see how it can save your time and boost your productivity!
Watch this space for more such custom function codes.