Get & Post Function in CRM: You can set up functions in 6 places:

Create a standalone function.
Associate function to a workflow rule.
Use functions later by including them in Schedules.
Set the function to get execute upon the click of a Custom Button.
Associate a function to a Relate List.
Associate a function to CRM Fundamentals (Validation rules).
To create a function

Get & Post Function in CRM

1. Go to Setup > Developer Space > Functions.
2. In the Functions page, click + Create New Function.
3. Choose the place where the function are meant to be add.
4. Click Next.
5. In the Create Function page, do the following:
– Give a Name and description(optional) for the function.
– Click Edit Arguments.
– Set the arguments to be use in the script, with field name or custom value in CRM module.
– Write your require function in the Deluge Script Editor.
– Click Save & Execute Script to validate your code.
– Click Save.
6. Click Save.
The function gets list in the List View of the Functions page.
Please note that the functions specifie to be used at a particular location cannot be use elsewhere. For example: a function configure for Workflow Rules cannot be use in Schedules.

Calling Functions using REST APIs

A function lets you have additional functionalities and features in your CRM apart from the conventional features. Functions needs a trigger to call it. The trigger could be in the form of a workflow, blueprint, relate list or through the click of a button.

If the function needs to be triggere without employing these methods or from external sources, you can create standalone functions and make them available as API calls. Triggering functions through REST APIs which gives the flexibility to trigger it from anywhere inside Zoho CRM or from any third party application.

Sample function as an API call:

A form which automatically generates a lead in your CRM with the information given as input in the form.

Step 1:

Create a standalone function with the following code.

Step 2:

To make function available as an API

1. Go to Setup > Developer Space > Functions.
2. Click the Settings icon for the corresponding function which needs to be made an API.
3. Click REST API.
4.The API Name field displays the API name of the function which you must use to invoke it. This API name are system-generated; you cannot modify it.
5. Enable OAuth2.0 and the API key sliders.
6. Click Save.

Step 3:

The sample here are shown as a form creates using Zoho Creator. Create the form such that it has the fields “FirstName”, “LastName”, “Company” and “Mobile”. You can program the function to get execute upon the click of Submit button.

Result:
Once the Submit button gets click, the function gets execute and the Lead gets create in your CRM. The lead has the details which was given within the form.