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.
Alert message in a Service Catalog Item onLoad Script pops up before form load on Service Portal - Known Error
  • >
  • Knowledge Base
  • >
  • Known Error (Knowledge Base)
  • >
  • Alert message in a Service Catalog Item onLoad Script pops up before form load on Service Portal
KB0722501

Alert message in a Service Catalog Item onLoad Script pops up before form load on Service Portal


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

Description

An alert message in a Service Catalog Item onLoad Script pops up before the form loads on Service Portal.


Steps to Reproduce

1. Log in as administrator

2. Activate the Service Catalog Item 'Sample Item'

3. Set Catalogs to 'Service Catalog' and Category to 'Can we help you?'

4. Create an onLoad Service Catalog Client Script as follows:
function onLoad() {
//Type appropriate comment here, and begin script below
alert('Test onLoad!');
}

5. Navigate to the Service Portal homepage /sp

6. Click on 'Order Something' > 'Can we help you?'

7. Click on the 'Sample Item'

8. Go back to 'sc_catagory' page

9. Click on the 'Sample Item' again

Observe the alert message pops up immediately on the 'sc_catagory' page, then the 'sc_cat_item' loads in over one minute.

Workaround

This is expected behavior and by design since Kingston. Prior to the Kingston release, onLoad scripts were executed after all the fields were rendered in the form. Since Kingston the flow has been optimized to avoid latency issues caused by inactivity or slow network. The execution order was swapped so that the client scripts are executed first, and the form renders later.


Related Problem: PRB1321873

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?

Attachments

Attachments

  • alert.jpg

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.