Custom Functions
Custom Functions allows you to simply drag and drop code to automate your business processes. Using custom functions, you can update the data in a related database or a third-party application automatically by executing simple program scripts written using the low-code programming language, Deluge, associate them to workflow rules, and automate the process based on your organization’s needs.
What is Deluge?
Deluge (Data Enriched Language for the Universal Grid Environment) is an online scripting language integrated with Zoho Creator. It enables users to add logic to the application, incrementally, making it more powerful and robust.
To know about Deluge, refer the Deluge Reference Guide.
If you wish to learn Deluge by writing code samples, click here.
Create Custom Functions
Here’s how you can create a custom function:
- Go to Settings on the left sidebar.
(OR)
Click Settings in the top right corner of the page. - Click Actions under Automation.
- Click the Custom Functions tab.
- Click + New Custom Function in the top right corner of the page.
- Enter the Name of your custom function.
- Provide Description, if necessary.
- Select the Module for which you want to trigger the custom function from the dropdown.
- Write the function in the deluge script editor.
Protip: You can quickly access the support and guide related to Deluge in the top right corner of deluge script editor.
- Click Save.
Associate Custom Functions to a Workflow Rule
The custom function that you create should be associated with a workflow rule. Whenever a record matches the criteria in a workflow rule and the workflow rule is triggered, the associated custom function will also be executed automatically. Here’s how:
- Go to Settings on the left sidebar.
(OR)
Click Settings in the top right corner of the page. - Click Workflow Rules under Automation.
- Click + New Workflow Rule at the top right corner of the page.
- Enter the necessary details.
- Under Actions, choose Custom Functions as the Type and select the custom function you want to associate with the workflow rule.
- Click Save.
Now, whenever the criteria is met, the workflow rule will be triggered, which in turn will trigger the custom function.
Edit Custom Functions
Here’s how you can edit a custom function:
- Go to Settings on the left sidebar.
(OR)
Click Settings in the top right corner of the page. - Click Actions under Automation.
- Click the Custom Functions tab.
- Hover over the custom function you want to edit and click the More icon.
- Click Edit.
- Make the necessary changes and click Save.
Delete Custom Functions
Warning: Deleting a custom function is permanent and cannot be undone. If the custom function you’re deleting is associated with a workflow rule, the workflow rule will not be executed.
Here’s how you can delete a custom function:
- Go to Settings on the left sidebar.
(OR)
Click Settings in the top right corner of the page. - Click Actions under Automation.
- Click the Custom Functions tab.
- Hover over the custom function you want to delete and click the More icon.
- Click Delete.
- Confirm your action by clicking Delete again in the pop-up.