A simple example of Record Watcher for Service Portal (Jakarta and Kin

https://community.servicenow.com/community?id=community_blog&sys_id=12ade2a9dbd0dbc01dcaf3231f96199e


Let's learn today how to use one of the powerful concepts of Service Portal called Record Watcher. This feature allows a widget developer to respond to table updates in real-time.

Now let us create a simple widget to keep count of our Critical Incidents to find out how Record Watcher works.

  • Step1: Create a widget

            Click on widgets under "Service Portal" application menu (or you can also create widgets using widget editor). Create a new widget by clicking on the new button.

                  Below is the example widget I have created.

A simple example of Record Watcher for Service Por_第1张图片

Please use the below snippets to create your widget

HTML:


      
              Number of Critical Incidents
                                                                     {{c.data.incidentCount}}