Our December Office Hours are on Holiday break - See you in January 2025! - REGISTER TO STAY UPDATED.

How to Add a Button on the Incident Page in ServiceNow to Open a SupportLogic Widget in a Pop-Up Window?

Modified on Thu, 7 Nov at 4:42 AM

Using a Button for Pop-Up Access:


In ServiceNow, embedding an iframe widget directly on the Incident or Ticket page isn’t straightforward. Instead, a practical approach is to add a button at the top of the Incident page. 

This button, when clicked, opens a new pop-up window with the SupportLogic Case details, including the current Incident ID in the URL.


 This guide will walk you through setting up this button using UI Actions.


Steps

  1. Navigate to UI Actions

    • In the ServiceNow application navigator, search for UI Actions and select UI Actions under System UI.



      2. Create a New UI Action

      • Click New to create a new UI Action for the Incident table.




        3. Configure the UI Action

        Set up the new UI Action with the following values:

        • Table: Select Incident [incident].

        • Name: Enter a name, like SupportLogic Widget Open.

        • Action name: Provide a unique identifier, such as supportlogic_widget_open.

        • Form button: Check this box to display the button on the Incident form.

        • Client: Check this box to run the script on the client side.


          4. Add the Onclick and Client Script

          • In the Onclick field, enter the below function call:

            openWidgetWindow();


            In the Client Script section, add the following code:
             

            function openWidgetWindow() {
            
              // Get the current Incident ID
            
              var incidentID = g_form.getUniqueValue();
            
               
            
              // Construct the URL with the dynamic Incident ID
            
              var url = 'https://iframe.<customername>.supportlogic.io/view/case/' + incidentID + '/details';
            
               
            
              // Open the widget in a new window
            
              window.open(url, 'SupportLogic Widget', 'width=800,height=600');
            
            }


            This script will dynamically include the Incident ID in the URL, so each time the button is clicked, it passes the correct Incident ID to the SupportLogic iframe.




            5. Save and Test the UI Action

            • Click Submit or Update to save the UI Action.

            • Navigate to any Incident record to verify that the button appears at the top of the page.

            • Click the button to ensure it opens a new pop-up window with the correct SupportLogic Case details based on the current Incident ID.


Note: Please reach out to support in case of any issues as there are few pre-requisites related to CRM URL and iframe containers configurations are required which may involve coordination with internal teams. Also it may vary by customer based on the customer’s subscription or payment tier.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article