Associate Functions in Related Lists
Each record in Zoho CRM has the option to associate other records to it. For example, a Contact has notes, activities, potentials, products, attachments, etc. associated to it. These are called Related Lists and are provided by default but you can also have custom related list added to a record. Custom Related Lists helps you view data collected from other sources.
A function is a set of statements grouped together under a name and can be invoked from anywhere within a program. Deluge Scripting supports Functions, using which we can structure the deluge script, in a more modular way, accessing all the potential that structured programming can offer. Related functions can also be grouped under a common category based on their purpose, called namespace, which helps in easy maintenance. Functions can be invoked from form/field action scripts or on selected records in a view.
Use Functions From Gallery
Zoho CRM offers some pre-defined Deluge functions that are ready to use. Browse through the gallery and select a function that suits your requirement. The selected function will be added to your list of functions. You can then use this function as a related list anytime.
To add a related list to a record by selecting a function from the gallery,
Click on a Module (tab) and select a Record.
On the Record Details page, click Add Related List.
In the Add Related List popup, click Functions.
The Existing Functions pop up opens. Use the Languages drop-down to select the language in which the function is written. The list of functions written by the users of your organization is displayed. Click Add Now to add it to the related list. Or, click Choose from Gallery.
NoteThe Choose from Gallery option is displayed only when you select Deluge from the Languages drop-down.
Click the Add Now button of the function you want to use. The function will be added to the list of functions.
In the Add Related List web page, specify the following:
Specify a name for the Related List.
Specify the Argument. Click the Add Argument link to specify more.
NoteThe Argument Mapping option is available only for functions written in Deluge.
Save the changes.
Create Functions
Apart from using the pre-defined Deluge functions from the gallery, you can also write your own functions in Deluge and Java.
Click on a Module (tab) and select a Record.
On the Record Details page, click Add Related List.
In the Add Related List popup, click Functions.
The Existing Actions pop up opens. Use the Languages drop-down to select the language for your function code.
Click Create New Function.
In the Create New Function pop up, specify the function name, display name, description, and the language.
Click Next. The built-in script editor opens.
Write your code and save the function.
In the Create Custom Related List pop up, specify the name of the related list and click Save.