Quickly Move Changes Between Update Sets

We've all been there. -- You've been wired in, hammering away on code, making great progress on several fronts, when all of a sudden you're gripped with dread. You check the sprocket menu at the top-right, cautiously hopeful... but as it loads, and recognition sets in, the reality of the situation crashes into you like a sack of pidgeons.

You forgot to select your update set. 

At this point, it is perfectly reasonable to curl up into a ball and weep at the fact that you're going to have to sift through hundreds or even thousands of updates in the Default update set in your busy environment, picking out the ones that are yours and that are relevant to your current work, manually opening each record one at a time, and moving them to the correct update set. 

But here's a better idea -- What if you could just tick the box next to each update, click a button, and dump them all into your current update set? 

Join me after the break and not only will I show you how to do that, but I'll give you an update set that you can deploy to enable that functionality in a matter of minutes! 

Read more

Customize the Reference Icon Pop-up

As most ServiceNow users know, when you hover over the icon next to a reference field on a given form, you can see some details about the record that's being referenced. 

Well, what if you want to customize what fields are shown in that pop-up reference view? 

When a requirement came through to do just that in my instance, I was stumped for a good long while, chasing down some inaccurate/outdated documentation, but eventually I figured out the following process. 

Join me after the jump to see how to modify this pop-up view. 

Read more

ServiceNow: Geneva & UI16 - What's new

Brace yourself. Geneva is coming. 

Personally, I'm excited - I like new things. I've always been the early adopter. But I know that not everyone is as gung-ho for the future as I am, so I thought I'd share some tips and tricks on ServiceNow's "Geneva", and the new, drastically overhauled "UI 16" that will be the new place where most of us ServiceNow developers spend our daily 8-12 hours. 

Note: This is part 1 of a 2-part series on ServiceNow's Geneva update. This part will focus on the interface, and stuff you're likely to run into on day 1, as well as basic stuff you'll need to know so you don't shoot yourself in the foot. A more in-depth exploration of the different process areas such as changes to Knowledge Management, Change Management, performance, security, and so on - is forthcoming. So subscribe, and stay tuned! 

Join me after the jump, and learn what's new in Geneva from the perspective of an admin, a developer, and a user - from the browser-based IDE and the new way to elevate permissions in high security mode, to the basics of navigation in the new world... of Geneva. 

Read more

Detect/Prevent Update Set Conflicts Before They Happen

Do you have multiple developers working in the same instance? If so, there's a good chance that on at least several occasions, one of them has "stolen" an update/record from another. I'll explain what I mean by way of an example:

  • Developer A is working on a project that involves changing a script include. 
  • Developer B, working in parallel on a separate task, also changes the script include.
  • The update sets are pushed. Depending on the order, at least one developer is likely to see results in production that they do not expect based on their development. 

So, how can we prevent these kinds of conflicts/confusion? 

What if we could alert a developer whenever they're viewing a record that is captured in another active update set, that does not belong to them--

Read more

SN101: Boolean logic and ServiceNow's Condition Builder

This article is part one of a multi-part series called "SN101", in which we'll explore some of the basic functionality of ServiceNow in beautiful detail. While the "SN101" articles are aimed toward newcomers to the ServiceNow platform, or new JavaScript developers, there is very likely to be something for everyone in each article. Thus, even if you are an experienced developer, it is recommended that you read the SN101 articles in chronological order.

Let's talk about building queries in ServiceNow...

See the whole article including some pretty awful puns, after the jump.

Read more

Locate any record in any table, by sys_id in ServiceNow

Dozens of times, I've seen hard-coded sys_ids in scripts or system properties, and wanted to know what record they correspond to. Unfortunately, there isn't really a good way to do this without knowing what table the sys_id is in!
The global search box only supports searching by sys_id on tables for which that is specifically enabled, so the only solution for this has often been to scour script after script, digging down until I find where the sys_id is actually used, and try to decipher what table it corresponds to. Well, today I decided - "Enough is enough" - and I wrote a script to check each table for me. I was surprised at the ease with which I was able to accomplish my goal, as well as the speed and simplicity of the script.

Read more

Detecting Duplicate Records with GlideAggregate

Let's say you're working for a company who has just acquired another company, and you've just imported all of the users from the acquired company's User (sys_user) table.
Unfortunately, you realize just a second too late, that their user database contains some of the same people as are already in your database - for example, some executives had accounts in both services.
Or maybe you were previously running the instance without enforcing number uniqueness on the incident table for some reason, and you want to change that.

The first step to resolving these issues, is detecting duplicate records, based on a given field. Here's a simple script include that will do that for you:

Read more

Array.indexOf() not working in ServiceNow - Solution!

I'm baffled that this little issue has never cropped up for me until now, but I recently discovered a little annoyance in ServiceNow while iterating through an array. This issue had me going round in circles for hours, so hopefully by sharing my findings with our readers, I can spare some folks the frustration I felt.

First, I'll tell you a little story about how it happened to me, and then I'll tell you the explanation for this odd behavior.

Read more

Understanding Dynamic Filters & Checking a Record Against a Filter Using GlideFilter

I recently found myself in a situation where I had to check if a given record (the 'current' object in my case) matched a filter associated with another record (a client script, in my case). If you find yourself needing to do something similar, it might help you to know about an undocumented Glide API called "GlideFilter".

GlideFilter takes two arguments: 

  1. A glide record containing the record you'd like to check
  2. The query string (aka "encoded query") you'd like to check it against. 

The first argument may be self-explanatory - it's a GlideRecord object containing a single record.
The second argument, if you're not familiar with encoded queries, is a string of text that represents a query. If you've ever built a query in a condition builder, you've built an encoded query.

Read more

Bookmarklet: Load the current page in the ServiceNow frame

I often find myself middle-clicking a link or otherwise opening links in ServiceNow in a "new tab" or "new window". This means that I often get pages that load just the content frame, without the ServiceNow frame.

ServiceNow content frame without banner or application navigator

The frame is the header and side-bar that facilitate easy navigation around ServiceNow, and often times I find that I don't need it. However, when I'm in a tab and don't want to lose my place, but I do want to get the sidebar back, I'm pretty much out of luck. My options then, are to either manually modify the URL with some weird string I can never remember, or to go back to my main ServiceNow instance home page and start from scratch.

Wouldn't it be nice if there was an easier way to load the current page in the ServiceNow frame?
I think so too, so I wrote this little bookmarklet.

ServiceNow Frame

Click and drag that link up to your bookmarks bar or wherever you'd like to save it, and you'll have a handy little button that you can click to load whatever page you're on in ServiceNow, in the SN frame.