Welcome to the DevTools - created and maintained by Sascha Wildgrube.
DevTools is NOT an officially supported ServiceNow product.
DevTools does NOT come with any kind of warranty. If you use it, you own it!
To use the full potential of DevTools perform the following steps:
Controls if the Debug() function should write to the system log.
Controls if debug output should contain the current transaction runtime in milliseconds.
Controls if the "List" button should be globally visible.
Performs a number of changes to a scoped app's assets to maintain applicaton sanity. E.g. the function removes the copied_from attribute in atf tests. This function requires the RunScriptInGlobalScope() function.
Returns an array with unique values only.
Checks if a value exists in an array and returns true in that case, otherwise false.
Returns the operation (of a business rule) based on the provided record.
Creates a copy of the given value.
Produce a debug log output but only if x_snc_devtools.debug.log is set to true.
The DocumentationAPI helps to render fragements of an HTML page that documents the components of a scoped application.
Returns the name of a scoped application (and removes any "work in progress" postfixes).
Returns an array no matter what input type is given and performs necessary conversion if another type is provided.
Returns either true or false no matter what kind of value is given.
Returns all groups of a given user. An additional filter can be applied to the groups to be returned.
Returns an integer value.
Returns all key names of an object in an array. Returns an empty array if no object is provided or no members exist.
Returns the sys_id of the record that has been created or found in the given test step.
Returns an array with the sys_ids of the active roles of a user.
Returns a string value in all cases. Arrays and objects are converted into comma separated strings.
Returns the number of milisenconds passed since the start of the unix epoch.
Returns the number of milisenconds passed since the start of this transaction.
Returns the type of a value.
Returns the value of an object that is (or is not) part of an recursive object without generating errors if the object does not exist.
Converts a string to html.
Performs a single http request.
Checks if two values are equal. The function also supports arrays and can ignore the order of array elements while comparing.
Returns true if the given value is an object. False if not.
Checks if a table is fully scross-scope accessible. The function returns true if the access is set to public and apps from other scopes are allowed to perform read, create, update and delete operations.
Returns true of the current user has the provided role explicitly. Returns true if that is the case, returns false if not. If an admin does not explicitly have that role, it will also return false.
Returns true if the current user is elevated to security_admin, false if not.
Checks if the given record is a valid glide record object. Returns true if it is, false if not.
Checks if the given string is a syntactically correct sys_id. Returns true if it is, false if not.
Returns true if the given string is a valid version number, false if not.
Checks if the first version is compatible to the second version - whereas the first version is the version of an installed application and the second version is a requirement.
Loads all local test messages for an "application".
Produces a log output
Merges two objects.
Parses a string and returns a time value.
Parses a string and returns an object or false in case of failure (instead of pointlessly throwing an exception).
A function to process large amounts of records using a callback function. The function makes use of a specified date/time field to determine which record to process next. Multiple instances of a background script can run using this function to work on large amounts of records in a table without interfering with each other. For large tables it is imperative to add an index on the date time field!
Sets a single field value on a given record.
Renders a date/time value as an UTC ISO string.
Render any value as a string. In case of objects, the keys are displayed in alphabetical order. In case of arrays, the elements are displayed in the given order. In case of a GlideRecord, the table name, sys_id and number (if available) are displayed on top and a selected choice of fields leads the list of values despite the alphabetical order.
Run any script in the global scope even if the context is a scoped application. However the function requires full cross scope access configured for the sys_script_include table. Note that the script will be placed into a function body so you cannot assume that declared local variables will be valid after its execution.
The StopWatch class measures time in the same way as a real stop watch does.
The function returns the input string with all characters removed that are contained in the blacklist string.
A class to create test data records.
A class to manage the transaction cache.
DevTools contains the following customized test step configurations:
Checks if another required scoped application is installed in a supported version.
Performs a sanity check on a scoped app. E.g. it checks if all contained system properties are not set private and all tests have an empty copied_from field.
Checks if the given table is configured for full cross scope access.
Copyright 2020-2021 by Sascha Wildgrube
Licensed under the Apache License, Version 2.0 (the "License")
You may not use DevTools except in compliance with the License.
You may obtain a copy of the License at: https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
First baselined version