Inter-Widget Communication

Inter-Widget Communication

In some cases where an extension has multiple widgets, communication between each widget becomes crucial. This is made possible through inter-widget communication.

For instance, let us say an extension has two widgets: one at desk.ticket.detail.rightpanel and the other at desk.ticket.datil.subtab. Data from the widget on the right panel needs to be sent to the widget on the subtab. This requirement is achieved through the following code snippet:
  1. App.instance.getWidgets().then(function(widgets)
  2. {
  3. siblingwidgetId = widgets[0].widgetID
  4. var siblingWidget = App.instance.getWidgetInstance(siblingwidgetId);
  5. siblingWidget.emit('event', { from: Math.random() });
  6. });

Code Explanation
  1. App.instance.getWidgets() returns the array of sibling widgets of the extension.
  2. siblingwidgetId = widgets[0].widgetID gets the widgetID of the widget on the subtab. Here, widgets will have only one element. Therefore, iteration is not required. 
  3. var siblingWidget = App.instance.getWidgetInstance(siblingwidgetId) returns the whole instance of the widget on the subtab.
  4. siblingWidget.emit('event', {from : Math.random()}) sends the event response with data to the widget on the subtab. 
To enable the widget on the subtab to receive the event sent from the widget on the right panel, use the following code snippet:
  1. App.instance.on('event', function(data){
  2. // data({from : "randomnumber"}) sent from other widget
  3. });

    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









                                                                                                      • Related Articles

                                                                                                      • Widget Support

                                                                                                        This guide will help you with the following: Embed a Telephony Widget  Create a Web Tab‌  Create a Related List  Create a Custom Button  Create a Getting Started Widget  Create a Business Card Widget  Sometimes, you may want to include features in ...
                                                                                                      • Widget Support

                                                                                                        This guide helps you with the following: Embed a Telephony Widget  Create a Web Tab‌  Create a Related List  Create a Custom Button  Create a Settings Widget  Create a Business Card Widget  Sometimes, you may want to include features in your Zoho CRM ...
                                                                                                      • Multi-Widget Support

                                                                                                        As mentioned earlier, users can access an extension through more than one widget on the Zoho Desk UI. Adding multiple widgets for your extension is a simple task. All that you need to do is include the properties of each widget, separated by comma, ...
                                                                                                      • Building a Zillow - Related List Widget

                                                                                                        A Zillow widget embedded inside Zoho CRM allows users to obtain various pieces of information about properties in the US. With a Zillow widget, a CRM user can: Get complete property details by entering the property address as input information. View ...
                                                                                                      • Building a Ring Central Telephony Widget

                                                                                                        A RingCentral widget embedded inside Zoho CRM allows users to perform various activities. A CRM user can: Load the telephony dial pad as an iframe in the Zoho CRM interface by using the telephone icon at the bottom right corner of the screen. Make a ...
                                                                                                        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