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.


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

Seen In

There is no data to report.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2019-06-21 09:52:57