Securing .list And .do Pages Via ACLs

Within ServiceNow, anyone can go to any table by manipulating the URL or via the navigation menu.

I.E, if you want to go to the incident table, even if you haven’t access to the incident module, you can just:

  1. go directly via the url: or
  2. in the navigation menu search bar, type incident.list or

Having ACLs in place makes sure that the actions that you don’t want to happen don’t happen (create, write, read, delete). However, what if you just want to stop navigating to that URL in the first place?

You can stop users getting to the page via the navigation menu by editing the ‘NavFilterExtension’ UI Script (it has very good comments in there and easy to edit to do what you want).

I accidentally stumbled across a neater solution, again using ACLs.
Continue reading

Accessing Tomcat Logs In Real Time

Update: Just to add that these Tomcat logs are node specific. So if you want to watch another user’s transactions, you need to  be on the same node as that user. To switch nodes, you can use my Chrome Extension that’s on the store. More info is here

When trying to debug an issue, you add alert statements, log statements and info messages to a script attempting to understand what’s going wrong.

Often you can find the root cause relatively quickly. But other times, no matter how hard you look, something seems to be failing at a lower level. This is where the Tomcat server logs come in handy.

Accessing these usually requires downloading the log file and tracking down the exact time to find the issue.

The easier option is to watch the logs being written in real time with this simple Out of the Box UI Page and loading up whichever action your performing in one window, and watching the logs on the other window side by side: Continue reading

Generate Schema Definition

Updated the code because of a bug
At one of my clients, we were integrating with a number of systems. One in particular had asked for a schema definition of the tables they were reading from and writing to.

So I decided to write a script to provide a JSON output of the schema. As it’s going through the columns of the starting table, if it finds a reference field, it’ll do the columns of that table, and if it finds a reference field there it will do the same again.

It does this up to 5 levels deep. If it finds a self referencing reference field (such as manager on the sys_user table, it’ll just put in ‘Recursive Reference’).

ServiceNow will output it in one long string, but if you go to a site like Dirty Markup and paste the details, it’ll format it nicely for you.

Continue reading