How to show an OK/Cancel confirmation popup in a Service Portal Catalog Client Script

saishruthis
Tera Contributor

I’m trying to implement a confirmation popup with an OK and Cancel button (not just an alert or info message) in the Service Portal view of a catalog item, using a Catalog Client Script.

Requirement:

  • Popup should display a custom message
  • Popup should have OK and Cancel actions
  • Must work in Service Portal, not just the classic UI

What I’ve tried so far:

  1. confirm()

    • Not supported in Service Portal
    • In some cases, the catalog client script itself cannot be saved when using it
  2. GlideModal / glide_modal_confirm

    • Works in the native/classic UI
    • Does not work in Service Portal
  3. spModal.confirm()

    • Tried using it directly in a Catalog Client Script
    • Also tried embedding it via a custom variable of type Widget
    • In both cases, either the script/widget cannot be saved or the modal does not render

At this point, I’m unable to find a supported and save‑able way to show an OK/Cancel confirmation dialog from a Catalog Client Script in Service Portal.

Question: Is there a recommended or supported alternative to implement an OK/Cancel confirmation popup in a Service Portal catalog item (Catalog Client Script / Record Producer), or is this use case expected to be handled only via widgets or UI actions?

Any guidance or best‑practice approach would be appreciated. Thanks!

1 REPLY 1

Tanushree Maiti
Kilo Patron

Hi @saishruthis 

 

Use the GlideModal option. Refer : How to display custom popup while submitting a Service catalog in Service portal

 

Note: As per KB - KB0715672 The 'confirm' doesn't work in onChange Client Script/Catalog Client Script created on a Re... 

 

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin: