Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
The 'confirm' doesn't work in onChange Client Script/Catalog Client Script created on a Reference filed/variable on Chrome Browser - Known Error
  • >
  • Knowledge Base
  • >
  • Known Error (Knowledge Base)
  • >
  • The 'confirm' doesn't work in onChange Client Script/Catalog Client Script created on a Reference filed/variable on Chrome Browser
KB0715672

The 'confirm' doesn't work in onChange Client Script/Catalog Client Script created on a Reference filed/variable on Chrome Browser


2238 Views Last updated : Apr 7, 2024 public Copy Permalink
KB Summary by Now Assist

Description

Build information:
Build name: Jakarta
Build date: 09-05-2018_1933
Build tag: glide-jakarta-05-03-2017__patch10-08-24-2018

Issue Description:
The 'confirm' doesn't work in onChange Client Script/Catalog Client Script created on a Reference filed/variable on Chrome Browser. 

Steps to Reproduce

1. Log in as admin.
2. Import the XML file 'sys_script_client_89be000fdb20e7008742684814961957.xml' which is a 'onChage' Client Script created on Business Service field on Incident table.
****
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}

//Type appropriate comment here, and begin script below
var conf = confirm(getMessage('Hello World!'));
if(conf){
alert('You made the right choice.');
}
}
****
3. Open an incident record.
4. Click on the magnifying icon.
5. Select one record from the popup window.

Expected behavior
The Confirmation Dialog should pop up.
Actual behavior
The Confirmation Dialog didn't pop up.

Investigation summary
- This issue only happens on Chrome Browser.
- This issue happens on the Reference Catalog Item variable and onChange Catalog Client Script as well.
- This issue only happens on onChange Client Script on a Reference field.
- If I open the console of Chrome when choosing the value from the popup window, the issue will not happen.
- If I type text in the Business Service and select a value from the match list, the issue will not happen.

Workaround

This is expected behavior and by design in all currently supported releases.

 


Related Problem: PRB1311990

The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.