Custom Buttons
In Zoho Spend, there are default buttons that are used to execute pre-defined functions. For Example, the Save button is used to save your records, and the Submit button is used to submit the records to your approver.
If you want to create a new button apart from the default buttons provided in Zoho Spend, you can create new custom buttons to perform specific actions for your transactions.
You can create them using the deluge script and execute actions based on the functions you add. Also, you can create custom links to open external links from your transactions.
Note: You can create Custom Buttons and Links for the following modules:
- Items
- Vendors
- Trips
- Reports
- Advances
- Batch Payments
- Purchase Requests
- Request for Quotes
- Purchase Orders
- Purchase Receives
- Bills
- Recurring Bills
- Vendor Credits
- Payments Made
Scenario: Patricia is a manager at Zylker. If a report has been in the Pending Approval status for more than a week, she wants to send the approvers a reminder email. Patricia uses a custom button on the List page of the Reports module in Zoho Spend to trigger a reminder email to the approvers.
Create Custom Buttons
Here’s how you can create a custom button:
- Go to Settings on the left sidebar.
(OR)
Click Settings in the top right corner of the page. - Select the module for which you want to create the custom button.
- Go to the Links And Buttons (or) Custom Buttons tab.
- Click + New at the top right corner.
- Fill in the following fields in the pop-up:
- Custom Button Name: Enter a name for your button. The name of the custom button cannot exceed 25 characters.
- Button Type: Select Custom Button from the Button Type dropdown.
- Location: Choose where the custom button will appear on the module page.
- Details Page Menu: Places the button on the Details page of the module.
- List Page - Action Menu: Places the button on the List page of the module.
- List Page - Bulk Action Page: Places the button at the top of the List page of the module when performing bulk actions.
- Preview: Click to preview your button.
- Click Proceed.
- Select When to show this button? and choose one of the options based on your preference:
- Show Always: Select this option to display the button in all records (e.g., PR-01, PR-02, etc.) without any criteria.
- Show based on criteria: Select this option to add criteria to display the custom button for specific records.
- Enter the Deluge script code to define the button’s function.
Insight: Data Enriched Language for the Universal Grid Environment (Deluge) is an online scripting language integrated with Zoho Services. It enables you to write your own functions that let you modify the application to suit your needs, making it more powerful and robust.
Pro Tip: You can toggle comments, find and replace, show hints, and do a lot more quickly using the keyboard shortcuts. Hover over the Keyboard icon in the bottom right corner of the Deluge editor to view all the keyboard shortcuts.
- Select who can view and access the custom button in the Who can access this button? field. You can choose from the following options:
- Only Me - Select this option if you don’t want other users to access this custom button.
- Only Selected Users & Roles - Only admins and selected users can view and use the custom button.
- Everyone - All users of the organization can view and use the custom button.
- Click Save to save the custom button.
- Click Save and Execute to check if the custom button is working as intended. In the pop-up that appears, enter the record ID and click Execute.
Create Custom Links
Here’s how you can create a custom link:
- Go to Settings on the left sidebar.
(OR)
Click Settings in the top right corner of the page. - Select the module for which you want to create the custom link.
- Go to the Links And Buttons (or) Custom Buttons tab.
- Click + New at the top right corner.
- In the New Custom Button popup, fill in the following fields:
- Custom Button Name: Enter a name for your button. The name of the custom button cannot exceed 25 characters.
- Button Type: Select Custom Link from the Button Type dropdown.
- Location: Choose where the custom link will appear on the module page.
- Details Page Menu: Places the button on the Details page of the module.
- List Page - Action Menu: Places the button on the List page of the module.
- List Page - Bulk Action Page: Places the button at the top of the List page of the module when performing bulk actions.
- Preview: Click to see a preview of the link.
- Visibility: Choose who can access the link.
- Only Me - Select this option if you don’t want other users to access this custom button.
- Only Selected Users & Roles - Only admins and selected users can view and use the custom button.
- Everyone - All users of the organization can view and use the custom button.
- URL: Enter the URL and add placeholders if needed by clicking Insert Placeholders at the top of the field if necessary.
- Click Save.
Execute Custom Buttons/Links
After creating the custom button/link, you can execute them. Here’s how:
- Click the module for which you have created the custom link.
- Go to the location where you’ve created the custom link and click the button.
- Click Proceed in the pop-up to execute the action of the custom link.
Edit Custom Buttons or Links
You can make changes to a custom button/link you’ve created. Here’s how:
- Go to Settings on the left sidebar.
(OR)
Click Settings in the top right corner of the page. - Select the module.
- Go to the Links And Buttons (or) Custom Buttons tab.
- Hover over the custom button you want to edit and click the More icon.
- Click Edit.
- Make the necessary changes and click Save.
Reorder Custom Buttons or Links
This feature allows you to change the sequence of custom buttons listed on the Details or List pages of a module.
Prerequisite: You cannot reorder custom buttons/links when the Location is set to All. To reorder custom buttons/links, you have to select another location. For example, Details Page Menu.
Here’s how you can reorder the custom buttons/links created:
- Go to Settings on the left sidebar.
(OR)
Click Settings in the top right corner of the page. - Select the module.
- Go to the Links And Buttons (or) Custom Buttons tab.
- Change the Location from All to any of the other location.
- Click Change Order in the top right corner of the page.
- Drag and drop the custom buttons to change their order.
- Click Save Reorder after you have reordered the custom buttons.
Note: The first button in the order will be shown separately and other buttons will be placed under the More icon. If there are multiple buttons for one location, the button on the top of the list will be displayed, and other buttons and links will be inside the dropdown. This allows users to make sure the priority action button is positioned as a distinct button.
The custom buttons will be reordered based on your preference.
Delete Custom Buttons or Links
Warning: Once you delete a custom button/link, you will not be able to retrieve it.
You can delete the custom button/link you have created. Here’s how:
- Go to Settings on the left sidebar.
(OR)
Click Settings in the top right corner of the page. - Select the module.
- Go to the Links And Buttons (or) Custom Buttons tab.
- Hover over the custom button you want to delete and click the More icon.
- Click Delete.
- Click Delete again in the pop-up that appears to confirm your action.