In UI Script addLoadEvent function is not working

subbarao2
Tera Contributor

Hi 

i using madrid-12-18-2018__patch0-01-08-2019_01-17-2019_1433 version instance. we are facing an issue in UI script.

we written the code for redirect the instance page to portal page based on the user roles. but in Madrid "addLoadEvent" function is not working even j Query is also not working. Can any one help on this issue please.

my code syntax is given below

addLoadEvent(function() { 

alert("ui script is triggered");

}); 

 

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Subbarao,

So alert is not coming up?

Can you check what error is coming in browser console?

Regards

Ankur

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

subbarao2
Tera Contributor

this is the error i am seen in console 

subbarao2
Tera Contributor

I fixed that error by deactivated the dataTables.bootstrap.min.js ui script which is available in my ui scripts. now addLoadEvent is working in UI script.

 

thank you Ankur for the idea.

 

Hi Subbarao,

Can you also mark my answer as correct if that helped.

Regards

Ankur

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