Posts Tagged ‘GlideRecord’
Posted by Mark Stanger in Scripting Thursday, 2 September 2010 06:10 No Comments
I
had a request from a client recently to generate a random list of records from a given table (specifically the Configuration Item table). These items would be used as a pool of records for a random audit of the records in that table. I don’t think this will be used all that often but I figured I’d throw it out here so that people could use it if they needed it. Here’s the code…
Posted by Mark Stanger in Scripting, UI actions Wednesday, 19 May 2010 07:41 1 Comment
T
his script was designed specifically for easily creating a copy of a variable set but it could be easily adapted to create a copy of any other record (and associated records) in Service-now. Rather than use a field-by-field copy technique, this script works more like an ‘insert’ on the records it touches. Because of this, you get an exact copy without having to specify each and every field to copy. If you don’t want an exact copy of a particular field, you can overwrite it in the script. You can implement this copy functionality to copy a variable set by creating a UI action with the following settings…
Posted by Mark Stanger in Scripting Tuesday, 23 February 2010 06:37 3 Comments
I
doubt if there’s a single concept in Service-now that is more valuable to understand than how to use GlideRecord methods to query, insert, update, and delete records in your system. These methods have a wide variety of uses and are found at the heart of many of the business rules, UI actions, and scheduled job scripts that are essential to tie together your organization’s processes in your Service-now instance.
While the content of this post isn’t new information (additional examples can be found on the Service-now wiki), my aim is to provide a single page of information containing some common examples of these methods as a reference. This is an excellent page to keep bookmarked!
Recent Comments