Assign permissions dynamically to users in the application

Assign permissions dynamically to users in the application

Requirement

When a customer is added to the application, the application is instantly shared with the user, with the required permissions.

Use Case

In the order management application, a customer might sign up on the go once the business is live. All non-administrator users of the application should be given appropriate permissions —for example, a customer can view their orders and products. A vendor can see their products and the performance of those products. Appropriate permissions need to be assigned to the users who sign up as a customer or a vendor.

Steps to follow

1. Create two forms with the following details:
Form
Form Link Name
Field Type
Field Name
Field Link Name
Vendor
Vendor
Name
Name
Name
Address
Address
Address
Email
Email
Email
Customer
Customer
Name
Name
Name
Address
Address
Address
Email
Email
Email

The Email field holds the email address with which a customer or a vendor logs in to Zoho Creator to access the order management application.
 
2. Create the different sets of permissions for different users. In the application's Settings, click User Permissions under Permissions. Then, click the Add Permission button.
 
3. Give relevant permissions for the customers and click Save.
 
4. Similarly, create a permission set for Vendors and click Save.
 
5. Create a workflow to execute when a Customer record is added.
 
6. Click Add New Action, then click Deluge Script. Add the below code to assign the permission set Customer to the customer's email.
  1. //share the application with customer with Customer permission
  2. thisapp.permissions.assignUserInProfile(input.Email,"Customer");
  3. //Send notification mail with link to access the application
  4. sendmail
  5. [
  6. from :zoho.adminuserid
  7. to :input.Email
  8. subject :"Invitation to access Order Management"
  9. message :"Hi,<div><br></div><div>You have been successfully added as a Customer.</div><div><br></div><div>Click&nbsp;<a href=\"" + " https://app.zohocreator.com" + zoho.appuri + "\"" + " target=\"_blank\">here</a>&nbsp;to access \"Order Management\"</div><div><br></div><div>Regards,</div><div>" + zoho.adminuser + "</div>"
  10. ]

7. Similarly, create a workflow to execute when a Vendor is added.
 
8. Click Add New Action, then click Deluge Script. Add the below code to assign the permission set Vendor to the vendor's email.
  1. //share the application with customer with Vendor permission
  2. thisapp.permissions.assignUserInProfile(input.Email,"Vendor");
  3. //Send notification mail with link to access the application
  4. sendmail
  5. [
  6. from :zoho.adminuserid
  7. to :input.Email
  8. subject :"Invitation to access Order Management"
  9. message :"Hi,<div><br></div><div>You have been successfully added as a Vendor.</div><div><br></div><div>Click&nbsp;<a href=\"" + " https://app.zohocreator.com" + zoho.appuri + "\"" + " target=\"_blank\">here</a>&nbsp;to access \"Order Management\"</div><div><br></div><div>Regards,</div><div>" + zoho.adminuser + "</div>"
  10. ]

See how it works



    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





                        Still can't find what you're looking for?

                        Write to us:  support@zohoforms.com



                              




                            

                              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 SalesIQ Resources



                                                        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











                                                                                          • Related Articles

                                                                                          • Custom access permissions for app users

                                                                                            Requirement Create custom permissions for an application and assign them to relevant users. Use case In a human resources management application, users need to be assigned with different access levels, based on their designation. For example, ...
                                                                                          • Track software development lifecycle

                                                                                            Requirement   Use Blueprints feature to track and manage the process of software development. Use Case   A software company uses blueprints to track and manage the software development lifecycle. Various blueprint actions are needed to mark the ...
                                                                                          • Permission based reports and a consolidated report

                                                                                            Requirement             Set visibility of forms and reports based on teams. Management should be able to view all the reports consolidated in to one. Use Case   A firm tracks its suppliers details using the Supply Management app. The app has four ...
                                                                                          • Understand user permissions

                                                                                            A user is a person who can access your application. Under the User permissions page, the Owner or Admin of the app can define specific permissions to the added users, assign roles to them, and determine how data must be shared. Only the admin will be ...
                                                                                          • Understand portal user permissions

                                                                                            A permission set is a group of rules that govern the accessibility of the portal by the user. Permissions can be configured in different ways by the admin based on the scope of work for user within the portal. This enables the admin to assign ...
                                                                                          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