Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

changes made in UI Script not taking effect

georgechen
Kilo Guru

Hi folks, 

I am stuck at UI script changes on the Change Schedule gantt chart modifications. 

The Change Schedule calendar is under Change Management - Change Schedule app, but no matter how I change the UI Script or UI macro on this application, the outcome Calendar page does not seem to reflect the changes.  I've ensured to switch to this application for editing, but it seems to work on my changes to change_soc UI Page where I was able to trigger an alert and set calendar default date to today's date by setTime script and click 'Today' button

find_real_file.png

find_real_file.png

 

for example, when modifying UI Script 'gantt' by removing the entire script section, and then reload the Change Schedule Calendar -> the calendar still loads 

find_real_file.png

 

likewise, by removing the click event on gantt task clicking, the event still appears to work which brings a pop-up dialog to open the record.  (below screenshot captures the after the modification of removing "handleOpenRecord()" properly on ng-click

 

find_real_file.png

frustrating enough, the dialog still pops up.

find_real_file.png

find_real_file.png

 

 

Any advice would be really appreciated. 

Thanks folks!

2 REPLIES 2

Syvo
Giga Guru

Hi,

I just tested on my dev instance and when I clear the gantt script I can't get any gantt chart (as expected).

Instead I can see this error in console log :

Error: [$injector:modulerr] http://errors.angularjs.org/1.4.8/$injector/modulerr?p0=sn.c…%2Fjquery_includes.jsx%3Fv%3D01-17-2019_1433%3A17%3A30368%0A

 

A cache issue maybe? Did you try cache.do and clear your browser cache?

 

Hello, Thanks for your kind response.  I didn't get the error you did on clearing gantt script, but after reloading the report and debugging the script, it seems that I need to reload the script updated a few times in a new window before I can see it takes effect.   So it a sense, yes, it seems like a cache issue though.

 

Thanks any way!  My changes are now working as expected and I can keep my investigation going.