Display custom action button for specific records

Display custom action button for specific records

Requirement  

The custom action button in a report should be visible only for certain records, based on a condition.

Use Case  

An asset request app lets employees raise requests for gadgets or machines. While filling the form, employees can specify if the request has been discussed with their manager. If the request has not been discussed, the buttons Approve and Reject are displayed for the manager. If the request has already been discussed, the buttons are disabled.

Steps to follow            

1. Create three forms with the following details:
Form
Form Link Name
Field Type
Field Name
Field Link Name
Employees and Managers
Employees_and_Managers
Email
Employee Email
Employee_Email
Email
Manager Email
Manager_Email
Asset Request
Asset_Request
Email
Email
Email
Email
Manager Email
Manager_Email
Single Line
Asset Required
Asset_Required
Decision Box
Checked with Manager
Checked_with_Manager
Managers Approval
Managers_Approval
Email
Employee Email
Employee_Email
 
 
Email
Manager Email
Manager_Email
 
 
Single Line
Requested Asset
Requested_Asset
 
 
Decision Box
Discussed with Manager
Discussed_with_Manager
 
The Employees and Managers form contains the details of employees and their respective managers. The Asset Request form is used by employees to raise asset requests.The Managers Approval form is used by managers to approve or reject the asset requests.

2. Let's create a workflow to set the employee's email address to the email field when the Asset Request form loads. Based on the employee's email address, we will also set the manager's email address. Create a workflow with the following details:

The workflow is to be triggered when the Asset Request form loads, so we are selecting the Form Event as Load of the Form.

3. Click Add New Action.

4. Save the following Deluge snippet in the Deluge editor:
  1. //set the logged in employee's email address as the Email field value
  2. input.Email = zoho.loginuserid;

  3. //fetch and assign the manager's email address from Employees and Managers form based on the current employee
  4. input.Manager_Email = Employees_and_Managers[Employee_Email == input.Email].Manager_Email;

5. Now, let's create a workflow to pass the asset request records to the Managers Approval form. The manager can approve or reject the asset request. Create a workflow with the following details:

The record must be created in the Manager's Approval form once a record is successfully submitted in the Asset Request form. Hence, we are selecting Form Event as Successful form submission.

6. Click Add New Action and select Deluge Script.

7. Save the following Deluge snippet in the Deluge editor:
  1. //set the logged in employee's email address as the Email field value
  2. input.Email = zoho.loginuserid;

  3. //fetch and assign the manager's email address from Employees and Managers form based on the current employee
  4. input.Manager_Email = Employees_and_Managers[Employee_Email == input.Email].Manager_Email;

8. Now, let's add a filter in the Managers Approval report so that each manager can view only their reporting employee's details. Click Open Report Properties fo r the Managers Approval report.


9. Add the following filter. The system variable zoho.loginuserid represents the email address of the login user.

The above filter will only display records that contain the logged-in manager's email address.
Now that everything is set up, let's create the Approve and Reject buttons. We will also add a condition to only display it when the employee has not discussed the asset request earlier.

10. Select Managers Approval report > Quick View > Actions, and click +.                  

11. Create an action item with the following details:
           

12. Click Create Workflow to add instructions as to what should happen when the request is approved. For example, you can use the send mail task to send an email to the employee and the IT team saying the request is approved.
           
13. Similarly, create another action item with the following details.
           
14. Click Create Workflow to add instructions as to what should happen when the request is rejected. For example, you can use the send mail task to send an email to the employee and the IT team saying the request is rejected.

15. Now, let's display the buttons in the report. Navigate to Manager's Approval Report > Configure fields for Web.
           
16. Add the Approve and Reject buttons.

See how it works  

Points to Note  

  • The email addresses can be disabled to ensure employees do not edit the email values.
  • You can add your managers and employees in the application and share only relevant app components using permissions. For example, the manager should only be able to view the Managers Approval form, or the employees should only be able to view the Asset Request form.

    Zoho CRM Training Programs

    Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

    Zoho CRM Training
      Redefine the way you work
      with Zoho Workplace

        Zoho DataPrep Personalized Demo

        If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

        Zoho CRM Training

          Create, share, and deliver

          beautiful slides from anywhere.

          Get Started Now


            Zoho Sign now offers specialized one-on-one training for both administrators and developers.

            BOOK A SESSION








                                You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                    Manage your brands on social media

                                      Zoho Desk Resources

                                      • Desk Community Learning Series


                                      • Digest


                                      • Functions


                                      • Meetups


                                      • Kbase


                                      • Resources


                                      • Glossary


                                      • Desk Marketplace


                                      • MVP Corner


                                      • Word of the Day


                                        Zoho Marketing Automation

                                          Zoho Sheet Resources

                                           

                                              Zoho Forms Resources


                                                Secure your business
                                                communication with Zoho Mail


                                                Mail on the move with
                                                Zoho Mail mobile application

                                                  Stay on top of your schedule
                                                  at all times


                                                  Carry your calendar with you
                                                  Anytime, anywhere




                                                        Zoho Sign Resources

                                                          Sign, Paperless!

                                                          Sign and send business documents on the go!

                                                          Get Started Now




                                                                  Zoho TeamInbox Resources



                                                                          Zoho DataPrep Resources



                                                                            Zoho DataPrep Demo

                                                                            Get a personalized demo or POC

                                                                            REGISTER NOW


                                                                              Design. Discuss. Deliver.

                                                                              Create visually engaging stories with Zoho Show.

                                                                              Get Started Now







                                                                                            You are currently viewing the help articles of Sprints 1.0. If you are a user of 2.0, please refer here.

                                                                                            You are currently viewing the help articles of Sprints 2.0. If you are a user of 1.0, please refer here.



                                                                                                  • Related Articles

                                                                                                  • Update a form using custom action (from another form's report)

                                                                                                    Requirement   Update a form using a custom action configured in another form's report. Use Case In an engineering college student management application, a student may withdraw at any time of the academic year. Whenever a student applies for ...
                                                                                                  • Configure button action

                                                                                                    You can define an action that takes place when a button is clicked in your page. You can link various actions to a button click including redirecting users to an external URL, opening a Zoho Creator component like: a form, report, or a page. Also, ...
                                                                                                  • Store records for 30 days after deletion

                                                                                                    Requirement Deleted records must be stored for 30 days after deletion, after which they should be permanently removed from the database. Use Case A library management app is used to manage books, memberships, and other resources. When a membership is ...
                                                                                                  • Insert a record during an approval process

                                                                                                    Requirement   Insert a record into a form when an approval is approved or rejected. Use Case   A charity uses an application to approve the students who need their services. Any student can apply for their program, but the charity reserves their ...
                                                                                                  • Custom card layout for e-commerce app

                                                                                                    Requirement Display products in a card layout with a button to add required products to a cart. Use Case An e-commerce business uses an order management app to process orders. Products need to be displayed in a card layout with product images, and ...
                                                                                                    Wherever you are is as good as
                                                                                                    your workplace

                                                                                                      Resources

                                                                                                      Videos

                                                                                                      Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                      eBooks

                                                                                                      Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                      Webinars

                                                                                                      Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                      CRM Tips

                                                                                                      Make the most of Zoho CRM with these useful tips.



                                                                                                        Zoho Show Resources