jQuery not working after version upgrade

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-07-2022 11:08 PM
Recently my instance went on upgrade from Paris to Rome. Before the upgrade I had catalog client script which was using jQuery in order to make Accordion (button tag to work as accordion) which was working fine on portal.
After the upgrade it is not working as per expectation and I did below steps to make it work as read on community:
1. Setting Isolate Script to False.
2. Creating a property "glide.script.block.client.globals" with Type: true|false and setting Value: false
But following these steps also didn't help me in making my jQuery work. Please let me know how can this issue be resolved.
Note: Application is Global
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2022 04:17 AM
Hi,
As per image you shared synchronous GlideAjax won' work on portal.
is your script using it?
If not and you are sure nothing changed after upgrade please raise a HI ticket.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2022 04:23 AM
You can try to get jQuery from any element on the form. If your form (catalog item) has for example element with the name "number", then you can use
var $ = g_form.getElement("number").ownerDocument.defaultView.jQuery;
If your form (catalog item) has at least one editable field, then you can use
var $ = g_form.getElement(g_form.getEditableFields()[0]).ownerDocument.defaultView.jQuery;
One more option:
var $ = g_form.getElement(g_form.elements[0].fieldName).ownerDocument.defaultView.jQuery;
All variants will not work on Service Portal, but in Service Portal you can use
var $ = this.jQuery;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2022 12:31 PM
Hi Deepika,
I am facing the same issue. If you have a solution, please share.
Thanks.