Scripting

/Scripting

Make Checkbox Variables Mandatory

By | January 25th, 2011|Categories: Client scripts|Tags: , , , |

Mandatory fields are usually pretty simple to work with. ServiceNow provides simple UI policy and client script methods to make fields and variables mandatory. You may have noticed as you have worked with checkbox variables in the service catalog that these methods don’t apply. The reason for this makes perfect sense if you think about it. [...]

Calendar or Schedule-based Incident Autoclose

By | January 24th, 2011|Categories: Business rules|Tags: , , , |

Service-now provides the ability to automatically move incidents marked as ‘Resolved’ into a ‘Closed’ state after a certain number of days. In my experience I’ve found that this type of resolution/closure workflow is really the best way to configure your incident management setup because it allows end-users the ability to reopen incidents within a certain window [...]

Checking for Modified or Changed Fields in Script

By | January 20th, 2011|Categories: Business rules, Client scripts|Tags: , , , , , , |

Working in Service-now, you’ll find that a lot of scripting tasks come down to identifying which fields changed on a form (client-side) or record (server-side). In this post, I’ll show you some different techniques to identify changed fields in both client-side, and server-side scripts. I’ll also show you a way that you can capture changed fields [...]

Distinct GlideRecord Query

By | January 19th, 2011|Categories: Scripting|Tags: , |

Here’s a cool tip that I’ve actually wanted to know how to do for a long time. I can’t take credit for it though. I got the idea from a post of a Service-now customer admin, Garrett Griffin. So, thanks to Garrett for the inspiration. I think this is worth sharing with a larger group of [...]

Fixing the Fatal Flaw of Before Query Business Rules

By | January 5th, 2011|Categories: Business rules|Tags: , , , |

While this customization may still be necessary in certain situations, ServiceNow handles this issue in Aspen builds or later without any customization. I’ve written before on SNCGuru about how ‘before query’ business rules can (and should) be used to secure row-level read access to records in Service-now. While this usually works perfectly, there is one issue [...]