The case of the JScripts that wouldn’t update

Recently I have been doing some work for another company, adding a couple of JScripts to streamline a process and allow for better reporting. Fundamentally the scripts are pretty basic, add a lookup box, bring up a selection of options and then a little bit of magic is invoked to add a record to a table/update some records. They are using an older version of Smart Office (9.x) which did create a few headaches as some of the staples that I use in my scripts weren’t available (no DataGrid 😦 ) .

So once I was happy the script was working, it was deployed to the Jscript directory on the server. I’d get some additional testing done and discover some little quirks and address them. Then the script would be copied back to the server.

And this is where the oddities started. The script was copied to the server, and yet staff would report that when testing they were still having the old issues. I verified I had copied the new script (timestamps) but the old script which didn’t exist would still come down to the client (even after a clearcache). I spent time verifying that I wasn’t using an incorrect directory but no.

So, when looking through the Smart Office logs I noticed that the logs themselves provide a helpful URI which shows where Smart Office was downloading the script from (this is a screenshot a 10.x environment not 9.x)

So, I plugged the address in to a web-browser

And I can see the script – however it was an old one. Infact, in one of the instances a new script had been in place for over a week and yet the ‘previous’ version was shown when I used this method to investigate.

In my scripts I will generally try to put a change log, so it was pretty easy to see if the new version had come down.

I then discovered if I used Windows Explorer and went to the server directory where the script was and then right clicked on it and selected Open or Open With and opened in it a program like Notepad, if I did a refresh on my browser the new script would come down.

A quick clearcache on the client, and the new script would come down and the problems would disappear.

I’ve not come across this issue before, and in may be related to some specific version of the M3 UI Adapter in use but it had me very puzzled for a while – hopefully this will save someone else the frustration!

 

This entry was posted in Misc. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s