Associate Functions to Buttons
Customization is the most powerful way to build a flexible CRM system. In Zoho CRM, you can customize modules, fields, pages, links, and a lot of other elements. In addition to these elements, Zoho CRM now allows you to create new button actions with the help of an advanced feature called Custom Buttons.
Zoho CRM has standard buttons that are used to execute various predefined actions. For example, Convert is a standard button used to convert a Lead to Contact, Account or Potential. Similarly, Clone is another standard button that is used to clone any record within your CRM account. Likewise, CRM Administrators can create new buttons and define a set of actions based on their requirements. Custom Buttons in Zoho CRM can be used to connect your CRM with third party applications, connect different Zoho CRM modules or connect with other Zoho applications.
Availability
Note:
- Custom Buttons are restricted based on profile permissions. Administrators can share each custom button with different profiles and users in those respective profiles can only access it.
- Custom Button is available for all predefined and custom modules except the Activities module.
Create Custom Button
To create a custom button
- Log in to Zoho CRM with administrative privileges.
- Go to Setup > Customization > Modules and Fields
- From the List of Modules, select the required module.
- In the Links & Buttons tab, click Create New Button.
- In the Create Your Button page, do the following:
- Enter the name of the button.
The button name should not exceed 30 characters. - Click the Add Description link and specify the details of your custom button.
The description should not exceed 250 characters. - Choose the location of your custom button from the drop-down list.
Custom buttons can be placed in 6 different places in your CRM account - Create/Clone page, Edit page, View page, List View page, a button to each record in the list view and Related Lists Page.
Note that you can create up to 50 buttons for each module. - Choose an action to be executed when a user clicks the custom button. You can either choose a predefined action from the gallery or an existing action that was already created by users in your organization. Also define your own action by writing a custom function, open a new web tab or invoke a URL based on your needs.
It is mandatory to choose the button action. See Button Actions
- Enter the name of the button.
- Click Save.
Once the custom button is associated with an action, CRM Administrators can manage permissions by assigning only specific profiles to view and access the custom button.
Note
- You are allowed to create up to 50 custom buttons for each module in Zoho CRM.
- If you have placed the custom button in a List View page, make sure you select at least one record before you execute the button action.
- From list view, you can also choose multiple records to perform the button action. In case when multiple records are selected and the button action is a deluge function, then the values of the records passed will be ||| (three pipe symbol) separated. If the button action is a Java function, you will get the IDs of the records selected in the crmAPIRequest object.
- If you want to manipulate the data of a lookup field,
- In Deluge, the values of the lookup fields are already available to be mapped as function arguments.
- In Java, you must retrieve the record information using the crmAPIRequest object and the response contains the module API name and ID of the lookup field. Using this ID, you can retrieve other details of the lookup record using integration tasks.
Define Button Action
Every custom button should be associated with an action when a user clicks the button. You can define your button action in any of the following ways:
- From gallery
- From existing actions
- Write your own functions (powered by Deluge Script Editor)
- Invoke a URL
- Open a web tab
1. Choose your button action from gallery
Zoho CRM offers you a few ready-to-deploy button actions in the gallery, which can be associated with a custom button for different business scenarios whenever required.
Consider the following scenario:
Recurring Potential: For example, you may require to repeat a potential for one year. Create a custom button that clones a particular potential record information for the next one year.
To associate Gallery function with a custom button
- Create a custom button and choose your button action as From Gallery from the drop-down list.
Ready to use actions will be listed in the gallery. - Click Configure for the corresponding action that you want to use.
For example: Recurring Potential - In the Configure Custom Function dialog box, specify the values for the Argument mapping and click Save.
- Select the profiles to which you want to provide access to this newly created button.
- Click Save.
Your custom button will be created successfully.
For example: in the Potentials module, whenever a user clicks the button "Recurring Potential" in the record's details page, the particular potential will be cloned for the selected period of time.
2. Choose your button action from existing action
Existing actions are predefined button actions created by users in your organization. This option will be available only when you have already created custom functions for custom buttons in your Zoho CRM account. These actions can be reused with different custom buttons whenever required.
3. Define your own button action
You can define your own button action in the following ways:
- writing custom function or
- invoking a URL
- open a web tab
Write your own function
Using our Script Editor, you can start defining your own button action by writing a new function in Java or Deluge. See Also Deluge Script - Reference Guide and Scripting Java functions.
To write your own function
- Create a custom button and choose your button action as Writing Function from the drop-down list.
- In the Customized functions page, do the following:
- Specify the Name and Description to your function and click the Edit Arguments link.
- In the Edit Arguments box, specify the method name and map the argument with field name or specify custom value in CRM module.
- Click Done.
- Specify the Name and Description to your function and click the Edit Arguments link.
- Write your required function in Deluge Script Editor.
- Click Save and Execute Script to validate your code.
If there are no errors, your script is ready to associate with the custom button. - Click Save.
The script will be associated with the custom button. Choose different user profiles to check who can access the custom button and click Save in the Create Your Button page. Whenever you click on the custom button, the associated function will be triggered and the required action will be performed in one click.
Response Tracking
You can create an alert or show a pop-up notification whenever you click on the custom button. This response should be configured while writing the custom function using the deluge script editor. If any open URL tasks are configured in custom function, the last opened URL task will be opened as per user's configuration either in a new tab or a new window or a pop-up window. By default, empty string will be returned for every custom function that you associate with your custom button.
Functions Limits:
The overall functions usage limits is shown below. This limit is applicable for the custom functions used for workflow automation, custom buttons and custom related lists.
Integration Tasks - 25000 Zoho API calls/day using deluge.
Get Data - 25000 calls/day
Post Data - 25000 calls/day
Send Email - 1000 emails/day
Note:
- Workflow rules can also be triggered through the function executed from custom button by using the CRM API integration tasks inside Deluge Scripting.