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 leverage the full potential of DevTools functions, some settings need to be changed to allow more cross scope access for scoped apps. This might be considered as a breach of security guidelines and should be validated with those who are responsible for security within the instance!
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 application sanity. E.g., the function removes the copied_from attribute in atf tests. This function requires the RunScriptInGlobalScope() function.
Sets a DevTools system property.
Removes a value from an array.
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 fragments 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 the database views which use a given table.
Returns all groups of a given user. An additional filter can be applied to the groups to be returned.
Generate a hexadecimal SHA 256 hash string.
Returns the instance root URL.
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.
Get a pseudo-random string token of a given length consisting of numbers only.
Shorthand to get a record from a table based on its sys_id.
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 all tables which have at least one column with the given type.
Returns the number of millisenconds passed since the start of the unix epoch.
Returns the number of millisenconds 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.
Executes the delete member function of a glide record in global scope.
Executes the insert member function of a glide record in global scope.
Executes the query member function of a glide record in global scope.
Executes the update member function of a glide record in global scope.
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.
Returns true if the given parameter is the name or the sys_id of an existing system property. False if not.
Checks if a table is fully cross-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.
If the given user is a "technical" user, the function returns true, otherwise false.
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.
Returns true of the given string identifies a database view. 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 of the given table exists. 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!
Deletes a single record from a table. Returns true if the record could be deleted successfully.
Sets a single field value on a given record.
Returns a user-friendly number of bytes using KB, MB and GB where appropriate.
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. To return a value from the script, set the "result" variable.
Sets a system property independent of its scope.
The StopWatch class measures time in the same way as a real stopwatch 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.
Adds a role to a user if the user doesn't have the role already.
Impersonates a user based on a user's sys id.
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