jQuery not working after version upgrade

Deepika Mishra
Mega Guru

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

find_real_file.png

 

find_real_file.png

7 REPLIES 7

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

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Oleg
Mega Sage

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;

ricgupta
Kilo Contributor

Hi Deepika,

 

I am facing the same issue. If you have a solution, please share.

 

Thanks.