• Python Script for Downloading Attachments

    I’ve been exporting a lot of data from my ServiceNow instance lately for archival purposes (IYKYK) and one of the challenges I’ve encountered is properly preserving attachments.

    Continue reading →

  • The GQ Script Include

    The GlideQuery helper functions you never knew you needed

    I wonder how many ServiceNow developers know the GQ script include exists. Maybe you’ve heard of GlideQuery, but GQ is a bit of an undocumented feature.

    Continue reading →

  • BetterGetter

    In keeping with my series about GlideQuery, I’d like to share a tool Dan and I made that can slightly improve the experience when you’d prefer to use GlideQuery but have no choice but to use GlideRecord.

    Continue reading →

  • Scripted Due Dates in the Ask For Approval Action

    Something in Flow Designer that has always bothered me is that I’ve been unable to get scripted due dates to work in the Ask For Approval action. If you’re unfamiliar, due dates provide the ability to specify how long the flow should wait for approval, as well as what action should be taken on the approval when the specified due date arrives. This prevents a flow from waiting endlessly for an approval response.

    Continue reading →

  • GlideQuery Perks, Part 0.5: Resources

    Before I start my GlideQuery series proper, I’d be remiss if I didn’t take two steps back and recognize all the great content already out there on the topic. I certainly didn’t discover all the benefits of GlideQuery myself, though I do have direct experience with most of them. This article will be a complete rundown on every publicly available resource I can find.

    Continue reading →

  • Friends Don’t Let Friends Use GlideAjax

    I used to hate writing GlideAjax Script Includes, but I haven’t written one in probably five years. How have I avoided it? Easy! Let me show you how to hit the Table API in a Client Script using vanilla JavaScript.

    Continue reading →

  • GlideQuery Perks, Part 0: What’s wrong with GlideRecord?

    When I first encountered GlideQuery, for a brief moment I naively assumed it was a complete modern replacement for GlideRecord and I got really excited. But I was quickly disappointed when I learned it’s just a wrapper for GlideRecord. As such, I thought it must have all the same drawbacks and limitations, and for a while I admit I was an unbeliever and a naysayer. But, as I learned more, I realized GlideQuery is one of the best things that ever happened to ServiceNow. I’ve been using it exclusively for nearly two years and I hope through this new series of articles I can convince you to switch if you haven’t.

    Continue reading →

  • GlideQuery: Selecting All Fields

    I love how GlideQuery’s select method takes a list of column names and returns a Stream of records with only those columns. Since it uses GlideRecord under the hood, I’m not sure we get much performance gain from it, but it makes working with the resulting objects so much more pleasant, having exactly and only the columns you need in a given context. But what can you do if you really need every column for a given record?

    Continue reading →