• Minimalist SLA grid formatter

    A while ago I built a minimalist SLA grid formatter for a team that needed to see their SLAs at a glance. They wanted their SLAs at the very top of their task form, so a formatter was about the only way to satisfy their requirement. I think it turned out great so I’d like to share it with you.

    Keep reading “Minimalist SLA grid formatter” »

  • Diddling with e-mails and watermarks

    A while back I had a weird use case where I needed an incoming reply from an outbound e-mail notification to be attached to a different record than the notification had originated from. I was working with two record types with a one-to-many parent/child relationship. I needed to trigger an outgoing e-mail whenever a child record was created, but the stakeholders wanted the audit trail of all outgoing e-mail to live at the parent level, and they wanted replies coming back from those outgoing e-mails to also be attached to the parent record instead of the child.

    Keep reading “Diddling with e-mails and watermarks” »

  • Be careful with joins

    I hit a funny issue today with GlideRecord join queries. The code I was writing was similar to this:

    Keep reading “Be careful with joins” »

  • Get GlideDuration value in millseconds

    Curiously, ServiceNow’s GlideDuration object gives you a way to set the duration in milliseconds (i.e. passing in the millisecond value when constructing a new instance) but there’s no simple way to get back that duration expressed in milliseconds. You can get it back expressed in days, hours, minutes, and seconds in just about any format you might need, but not in total milliseconds. I recently had a use case for expressing a duration in total hours, where being able to get back a millisecond value would have been very convenient. But instead I had to get creative with string manipulation to convert the duration display value back into milliseconds. If you need to do this too, do yourself a favor and put it in a Script Include so it’s reusable.

    Keep reading “Get GlideDuration value in millseconds” »

  • Metric for Updated By

    Defining a ServiceNow Metric to track every update to any record in a table

    A friend recently asked how he could create a ServiceNow Metric that would track who makes each and every update to records in a given table. Sounds easy enough, right?

    Keep reading “Metric for Updated By” »

  • Integrating ServiceNow with HipChat

    My tutorial on integrating ServiceNow with Slack turned out to be one of my most popular articles ever. Justin Meader recently asked me on Twitter how easy it would be to integrate Service­Now with HipChat instead.

    Keep reading “Integrating ServiceNow with HipChat” »

  • Integrating ServiceNow with Slack

    Slack + ServiceNow One of our teams at work recently started using Slack for all their team communication and approached me about possibly having ServiceNow shoot Incident assignment notifications into one of their Slack channels. As it turns out, integrating ServiceNow and Slack is really easy. In this article I’ll show you how to enable the necessary Slack “Incoming Webhooks” integration service as well as give you a ready-to-go ServiceNow Script Include you can use to post messages to Slack from any scripted ServiceNow Business Rule. Finally, I include some examples and ideas for how to use and re-use the Script Include in your own Business Rules.

    Keep reading “Integrating ServiceNow with Slack” »