DevTools 1.108.0

Welcome to DevTools - created and maintained by Sascha Wildgrube.

Overview

Code library and tools for ServiceNow developers.

DevTools contains a number of Script Includes with useful javascript functions and classes like a GetType() function that really works. Several UI improvements like the "Re-Test" button in the test result form and shortcuts to various - sometimes hidden - views and system properties in your instance.

Disclaimer

DevTools is NOT an officially supported ServiceNow product.

DevTools does NOT come with any kind of warranty. If you use it, you own it!

Some features contained on DevTools and the techniques being used might be considered as a violation of security policies. Please make sure any use is based on conscious choice and careful assessment. This specifically applies to the functions RunScriptInScope() and RunScriptInGlobalScope() - which are used in many DevTools functions internally. These features are enabled by setting the system property glide.record.legacy_cross_scope_access_policy_in_script to "true".

System Requirements

Installation

  1. Set the system property glide.record.legacy_cross_scope_access_policy_in_script to "true". If the system property does not exist, it must be created (in global scope and type true/false).
  2. Create an account on GitHub - if not done already.
  3. Create a personal access token for your GitHub account.
  4. Add credentials to access GitHub - use "Basic Auth".
  5. Fork the repository https://github.com/saschawildgrube/servicenow-devtools.
  6. Go to Studio and import the DevTools application from source control.
  7. Execute installation scripts.
    Run the following script as a background script in scope x_snc_devtools:
  8. x_snc_devtools.InstallApp("x_snc_devtools");
  9. Set the sn_atf.runner.enabled system property to "true" to activate the ATF test execution - if not set already.
  10. On non-production instances: Run the DevTools test suite.
  11. In case of errors:
    1. If the test "DevTools - HttpRequest" fails this may indicate that the instance cannot establish an http connection to itself. This is be the case in some self-hosted environments and requires intervention by the teams responsible to configure the network around the instance.
    2. In a domain separated instance it may be necessary to switch to the topmost domain to pass all tests.
    3. If the test "DevTools - RunScriptInGlobalScope" fails: Retry after a few minutes. Some cross-scope privileges will be set up during the first test run and might take a few minutes to be effective. The function RunScriptInGlobalScope() is used in many other functions, so do look into any other failed tests as long as this test fails.
    4. Tests "DevTools - TestDataAPI": These scripts create various records (e.g. incidents, problems, etc.). If there are customizations in place that make additional fields mandatory, you may have to set up business rules to set these values - but only if the short description (or the corresponding field) starts with "_ATF_".
    5. If the "DevTools - Test data sanity" test fails you can use the following script to clear existing test data:
    6. var testdata = new x_snc_devtools.TestDataAPI('_ATF_DEVTOOLS_');
      gs.info('Before DeleteAllData(): '+x_snc_devtools.RenderValue(testdata.GetAllData()));
      testdata.DeleteAllData(testdata.GetAllData());
      gs.info('After DeleteAllData(): '+x_snc_devtools.RenderValue(testdata.GetAllData()));

Features

Script Includes and UI Scripts

DevTools contains a wide variety of functions and classes (server-side and client-side) for re-use.

Please refer to the reference section for details.

UI Actions

DevTools contains a number of very helpful UI Actions. One of the most powerful features is the "Save" button with active scope switching capabilities. Never ever loose changes because of switching between scopes and browser tabs at the same time.

Please refer to the reference section for details.

Sending a Prompt to a Large Language Model (LLM)

The function Prompt() can be used to send a prompt direct to a large language model, but it requires some setup:

  1. Navigate to Plugins
  2. Click button "Sync with Store"
  3. Search for Now Assist for Creator
  4. Install "Now Assist for Creator"
  5. Navigate to the Generic Prompt Capability
  6. Select the related list "OneExtend Definition Configs".
  7. Set the preferred LLM as the default.
  8. Open the OneExtend Capability Definition.
  9. Open the Connection and Credential Alias.
  10. Select "Create Connection and Credential" and add authentication credentials if not done already.

Cross Scope Scripting

The function RunScriptInScope() allows to execute code in any scope no matter what the current execution scope is. The function RunScriptInGlobalScope() specifically allows code execution in the global scope from any other other scope. This allows the use of API functions and classes which are only available in the global scope and NOT in scoped scripts. This allows more flexibility when developing scoped apps - and effectively removes any barriers between apps. The authors of DevTools believe that this is a good thing. Application scopes are NOT a security boundary. Scoped APIs have just not been implemented completely - so using these techniques serves as a workaround for incomplete scoped API implementation. It also allows scoped apps to interact with each other which would otherwise be impossible. I also believe that deployments via update sets are a method of the past. Features should always be deployed as part of scoped (or global scoped) applications via source control or AppRepo. This however requires such apps to perform installation steps - like manipulations of OOTB records - which would not be possible from within their own scope. Hence cross scope scripting techniques finally enable fully automated deployment pipelines without the need of any manual interventions.

To enable cross scope scripting the system property glide.record.legacy_cross_scope_access_policy_in_script must be set to true. As of the release of this DevTools version the only publicly accessible documentation of the system property's behaviour can be found in the knowledge base article KB0779287.

Baseline Application Version

The "Baseline Version" button on the application form is used to baseline an application version. To baseline an application means to provide a new version of an application from a development environment in a linked source control system. This enables installation to downstream instances or for public availability. The following steps are performed:

  1. Check if there are yet uncommitted changes
  2. Check if a branch named after the set version already exists
  3. Sanitize the app (using the DevTools' AppSanity() function)
  4. Set defaults (using the app's AppSetDefaults() function if it exists)
  5. Perform application specific baseline activities (using the app's AppBaseline() function if it exists)
  6. Remove the postfix "WORK IN PROGRESS" from the application name
  7. Create a new branch named after the set version
  8. Increase the minor version
  9. Add the postfix "WORK IN PROGRESS" to the application name

Teams are well-advised to protect version branches after baselining.

Perform the following steps to protect a branch in GitHub:

  1. Navigate to GitHub.
  2. Navigate to the repository.
  3. Navigate to "Settings".
  4. Navigate to "Branches".
  5. Click button "Add rule".
  6. Under "Branch name pattern" enter the name of the branch to be protected.
  7. Select "Require a pull request before merging".
  8. Select "Lock branch".
  9. Select "Do not allow bypassing the above settings".
  10. Click button "Create".

Perform the following steps to protect a branch in GitLab:

  1. Navigate to GitLab.
  2. Navigate to the project.
  3. Navigate to "Settings".
  4. Navigate to "Repository".
  5. Scroll to "Protected branches" and click button "Expand".
  6. Click button "Add protected branch".
  7. Select "Require a pull request before merging".
  8. Select the branch to be protected.
  9. Under "Allowed to merge" then under "Roles" select "No one".
  10. Under "Allowed to push and merge" then under "Roles" select "No one".
  11. Click button "Protect".

Shared Applications

A "Shared Application" is an application that is created and developed by a 3rd party, members of the open source community, a different department or organization. The application is hence "shared" by that other entity and imported to your own organization.

This requires such shared application to be treated differently than applications that are created and developed by your own organization:

  • Set maintainer and maintainer emails will differ as your own teams must embrace ownership shared applications.
  • The set documentation url should link to your own organization's knowledge management system.
  • The set repository url should point to your own organization's source control system repository for the application.
  • Whenever a change seems to be required in a shared application a hard choice is to be made: either you can contact the original author and ask for the change or your team(s) make the change themselves. The latter comes with a downside: Any change made may have to be backported into future versions of that shared application.
  • When baselining a new version into your source control repository, a shared application must also be treated in a different way. E.g. the "new" version must not be associated with the current date in the release notes and the version number should not be increased during baselining.

DevTools helps you with all of that (except for the decisions how required changes are made). By adding a record in the "Shared Applications" table for a shared application, the application is managed properly during baseline.

Dependency Management

In an ideal world all customizations are implemented in scoped apps (and some global scoped apps if there are really good reasons). And in that same ideal world, non of these apps have any dependencies. Each app can be installed and uninstalled independently. The real corporate world, however, is complex, messy and full of dependencies. For good reasons, separate capabilities are implemented as separate apps and hence these apps have dependencies to each other. For example: apps add fields to tables that are defined in other apps, they run scripts from other apps, or rely on logic implemented in flows from other apps.

Such dependencies must be managed - that means, the requirements of one app towards other apps and their minimum versions, must be documented and considered when performing deployments.

DevTools provides means for that documentation and visualization of these dependencies. Go to the sys_app form, switch to the DevTools view to find the dependencies related list (not the OOTB dependencies). The UI action "Dependencies" opens a ui page that visualizes the dependency requirements and status of the current app as a tree and as a list, which can be used as a deployment plan.

Technical Debt Management

A Technical Debt is any code or structure that a development team considers as to-be changed at a later point in time because it implies some form of burden to the development and deployment work to be done today.

Technical debts need to be managed - and that starts with documenting it. DevTools contains a table to store Technical Debt records which are part of an application and hence are deployed to target-systems. This allows for reporting, work planning and automated documentation.

Unfinished, defective or deprecated features that are part of an application at the time of a version baseline also represent a form of Technical Debt - as all of these require future work. Such features should eventually be hidden from users or prevented to impact the behavior of an application.

In cases where the technical debt is associated with a feature that needs to be turned on or off, a technical debt may have an ID and a boolean "switch" that can be used to control logic around these features. Developers can use the following pattern to control how code related to a feature that is currently considered as (or associated with) a Technical Debt should behave:

if (x_snc_devtools.GetTechnicalDebtSwitchState('x_your_scope','id_of_the_technical_debt') == true)
{
	// Hide unfinished work
	// Deactivate defective features
	// Deactivate deprecated features
}

If the Technical Debt with the given id exists and the switch is set to true, the function returns true, otherwise false.

Evaluator Errors

DevTools helps to surface evaluator errors (which are logged as warnings OOTB). The system property x_snc_devtools.ui.show_evaluator_errors.minutes controls whether and for how long evaluator errors should be displayed to admin users.

Force to Record Scope

DevTools enforces to switch to the scope of the current record on a form. This prevents any situation in which a form was loaded in the correct scope, changes are being made, and lost because the user changed the scope in a different tab. The OOTB behavior is downright annoying. DevTools comes to the rescue. The system property x_snc_devtools.ui.force_scope controls whether the scope should be changed when loading and saving a form. This may lead to some users being confused by the new (and unexpected) behavior - however, developers quickly become used to it and prefer the behavior over the OOTB behavior.

Instance Pipeline Names

An instance has a technical name (sometimes matching the domain name, but not always). This technical name can be used to define logic that depends on the instance on which code is executed. However, this is not a good practice. In complex environments, where applications may be shared across multiple production instances, any logic that directly depends on a specific instance may cause problems. The DevTools extension point allows to implement the function DevToolsGetInstancePipelineName() which allows to map technical names to so-called pipeline names (e.g., "dev", "test" or "prod"). The function GetInstancePipelineName() can then be used to get the current instance pipeline name to build instance specific logic.

Service Portal Deactivation

DevTools allows you to deactivate specific Service Portals.

A new field "Active" is added to the sp_portal table. Once set to false, the corresponding Service Portal will just disappear and is no longer accessible.

Fix the Flow Execution Domain Issue described in KB0998966

DevTools contains the business rule sys_flow_context - Set domain which implements the workaround to the issue described in KB0998966.

Prevent Useless Instance Scan Check Executions

Instance Scan linter checks execute on all records that have at least one script field. However, some records may have a script field but do not use it or the script field does not have to be checked because it is not relevant (based on the configuration of that record).

Examples are:

  1. sys_hub_flow_variable records are derived from sys_dictionary which contains a script field - but for a sys_hub_flow_variable record this script field is never relevant.
  2. sys_security_acl records where the script field is only relevant if the field "advanced" is set to true.

The business rule sys_metadata - Prevent useless checks prevents checks from running in such cases which may significantly reduce the time required to scan such records - or apps that contain such records.

Developers may create their own Application Files which also can contain script fields. In some cases such script fields are not used - but also scanned by Instance Scan linter checks. The DevTools extension point allows to inject additional rules that can help to avoid useless checks on such records. To define and inject such rules follow these steps

  1. Implement the DevTools extension point.
  2. Implement the function GetEncodedQueryToPreventUselessChecks using the following template:
    function GetEncodedQueryToPreventUselessChecks(rules)
    {
    	// The following combination is already supported by DevTools
    	// The following rule is for demonstration purposes only
    	x_snc_devtools.SetValue(
    		{
    			query: 'virtual=true', // The query to be used to avoid loading the record
    			derived: true // true if applicable to derived tables, false if not
    		},
    		rules,
    		'script', // only script checks are supported at this time
    		'sys_dictionary' // The class name of the table to apply the rule to
    		); 
    
    	return rules; // always return the rules object, otherwise all rules are deleted
    }
  3. Replace "sys_dictionary" by the name of the table that this rules applies to.
  4. Replace the query by the condition that identifies a record that actually contains a script and hence should be scanned.

Create User by Email

DevTools features the "Create User by Email" button to the User list. Follow these steps to configure the feature:

  1. Set the DevTools system property ui.createuserbyemail_button to "true".
  2. Create the GLOBAL system property "devtools.createuserbyemail.groups" and add a comma separated list of group Sys IDs to be assigned to the new users if needed.

Create and Send Credentials

DevTools features the "Generate and Send Credentials" button to the User form. Follow these steps to configure the feature:

  1. Set the DevTools system property ui.generateandsendcredentials_button to "true".
  2. Verify that the GLOBAL system property glide.email.smtp.active is set to "true".

Record Transporter

Data is managed on each instance and should not be "deployed". Code is part of applications and should be deployed as such.

However there are cases where the boundaries are blurry. If data records (i.e. records that are not in a table derived from sys_metadata) must be part of an application the Record Transporter comes to the rescue.

The Record Transporter allows to store any record that is not a sys_metadata derivative into a table that is. The table in which these records are stored is x_snc_devtools_transporter_record (which is derived from sys_metadata) and hence its records are captured as part of an application (in source control). Such records are associated to a Record Transporter Package (in table x_snc_devtools_transporter_package).

To "pack" records into a Package, create a Package in the GUI - but make sure to select the scope of the application that should contain the package - then use the function RecordTransporterRecordPack() to store individual records into the package.

To properly "store" to be deleted records use the function RecordTransporterPackageReset() before adding records to a package. The function will mark all existing records in the package to be deleted on the target instance. Once added again, these records will be stored to the package to be inserted or updated. This allows to keep track on deleted records of earlier versions of the package.

During installation use the method InstallerAPI::RecordTransporterPackageUnpack() to unpack the contained records on the target instance.

Code to store records could look like this:

// To set all existing records as to-be-deleted
x_snc_devtools.RecordTransporterPackageReset('x_your_scope.demo');
			
// Identify records based on whatever logic
var grRecords = new GlideRecord('x_snc_devtools_test');
grRecords.addQuery('name','STARTSWITH','Test ');
grRecords.query();
while (grRecords.next())
{
	// Pack the identified record into the package
	x_snc_devtools.RecordTransporterRecordPack('x_your_scope.demo',grRecords);
}

To unpack records, implement the AppInstall() function in your app like this:

function AppInstall()
{
	var installer = new x_snc_devtools.InstallerAPI(x_snc_devtools.GetAppName('x_your_scope'));
	
	installer.RecordTransporterPackageUnpack('x_your_scope.demo');			

	return installer.Finish();
}

CMDB CI Class "ServiceNow App"

DevTools introduces a new CMDB CI class called "ServiceNow App" which represents a ServiceNow app (scoped or global) that is installed on an instance or provided in a Source Control System for installation.

Functions prefixed with "ConfigurationItemServiceNowApp" can be used to insert or update these CIs.

Auto-generated documentation

If the system property "x_snc_devtools.code.auto_generate_documentation" is set to "true" a business rules will add some auto-generated documentation to the description of Script Includes that contain a class if the code has changed.

Field Formatting

DevTools can help to format (float) numbers in forms, related lists and list views in the classic UI - Polaris, however, is not supported yet! Follow these steps to activate the feature:

  1. Set the DevTools system property ui.formatting to "true".
  2. Implement the DevTools extension point.
  3. Implement the function DevToolsGetFormatConfig using the following template:
    function DevToolsGetFormatConfig(grRecord)
    {
    	var strTable = grRecord.getRecordClassName();
    
    	if (strTable == 'your_table')
    	{
    		var formatconfig = {
    			your_field: {
    				decimals: 2,
    				postfix: ' %'
    			}
    		};
    		return formatconfig;
    	}
    
    	return false;
    }
  4. Replace "your_table" by the name of the table that contains the fields to be formatted. Add support for more tables if needed.
  5. Replace "your_field" by the name of the field to be formatted. Add more fields if required.
  6. "decimals" specifies how many decimals digits should be used after the decimal delimiter.
  7. "postfix" specifies a constant string to be added after the formatted number.
  8. Note that the function will be called for each individual record, so the formatting can be dependent on other values of the same record.
  9. You may consider session or transaction caching techniques to improve performance.

Manage Record Order (Record Ranking)

The function RecordManageOrder() can be used set the records in a table into a definitive sequence based on a given integer field. The function is designed to be called in an async after update/insert/delete business rule like this:

(function executeRule(current, previous /*null when async*/) {
	
	var RecordManageOrder = x_snc_devtools.RecordManageOrder;
	RecordManageOrder('your_table', 'order', current ? current.sys_id : null, current ? current.order : null);

})(current, previous);

"your_table" is the technical name of the table in which records should be sorted (or ranked). "order" is the name of the integer field that defines the ordering sequence.

The "current" object is null in an after delete async business rule, hence the conditional statements.

Further Guidance

How to unblock Instance Scan?

On rare occasions an Instance Scan run does not finish properly and remains in an undefined state. This prevents further Instance Scan checks to run. Follow these instructions to unblock Instance Scan and to enable further scan operations:

  1. Navigate to the list of active transactions.
  2. If there is a transaction of Type "instance_scan", select it and choose "Kill".
  3. Navigate to the Scan Results list.
  4. Check if there is a Scan Result record in status "In Progress". Delete this Scan Result record.
  5. Navigate to the Progress Workers list.
  6. Check if there is a Progress Worker record with name "Instance Scan" in state "Running". Delete this Progress Worker record.
  7. Navigate to the Execution Trackers list.
  8. Check if there is an Execution Tracker record with name "Instance Scan" and completion time "empty". Delete this Execution Tracker record.

Reference

Configuration Options

Tables

UI Actions

Script Includes

  • AddScriptTestStep

    Adds a "Run Server Side Script" test step to the given test.

  • AppBuilder

    AppBuilder adds various application files to a scoped app. The function should be mostly idempotent.

  • AppBuilderAddSyntaxEditorMacro

    The function creates a syntax editor macro in the given application scope.

  • AppBuilderAddTestToSuite

    Add an ATF test to an existing test suite.

  • AppGetDependencies

    Retrieves information about the app's dependencies to other apps and required versions.

  • AppGetProperty

    Gets a DevTools system property.

  • AppInstall

    This script installs DevTools

  • AppSanity

    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, removes unneccesary field level ACLs and removes the is_private flag from system properties.

  • AppSetProperty

    Sets a DevTools system property.

  • AppVersionBaseline

    Creates a new version baseline for the given application. Handle with care! This function is still experimental.

  • AppVersionBaselineCheckReleaseNotes

    Checks if the given application's manual page contains valid release notes.
    If the application has a manual page and if the manual page contains a "Release Notes" section, then it checks if there is a sub-section titled with the current version and the current date.
    Returns true, if no "Release Notes" section can be found OR the subsection exists, or false, if the sub-section does not exist.

  • AppVersionBaselineIsRunning

    Returns true of a background job to baseline a new application version is already running, false if not.

  • ArrayAppend

    Appends the second given array to the first.

  • ArrayIntersection

    Returns the array of elements that are contained in both given arrays.

  • ArrayPushUnique

    Adds a value to an array if it doesn't exist yet. Returns the resulting array.

  • ArrayRemoveValue

    Removes a value from an array.

  • ArrayUnique

    Returns an array with unique values only.

  • ArrayValueExists

    Checks if a value exists in an array and returns true in that case, otherwise false.

  • AzureDevOpsAPI

    Interface to the AzureDevOps API
    |
    Methods:
    * initialize()
    * SetCredential()
    * SetPat()
    * SetMidServer()
    * SetApiUrl()
    * GetApiUrl()
    * Error()
    * GetRequestCount()
    * Request()
    * GetOrganizationPath()
    * GetProjectPath()
    * GetApiPath()
    * GetPublicProjects()
    * GetReposFromProject()
    * GetBranchesFromRepo()
    * GetFilesFromBranch()
    * GetFile()
    * ProtectBranchReadOnly()

  • Base64Decode

    Decodes a base64 encoded string and returns the original binary stream or string.

  • Base64Encode

    Converts a string or binary stream into a base64 encoded string.

  • BindAllFunctionsToThis

    Binds all functions of the given object to the given object. This is needed to access the "this" object within every function of the class.
    Javascript is inherently broken and the fact that this function is even necessary can serve as proof.

  • BusinessRuleGetOperation

    Returns the operation (of a business rule) based on the provided record.

  • CacheFlushMenu

    Clears the application menu cache.

  • Clone

    Creates a copy of the given value.
    If the parameter bSortKeys is set to true and the given value is an object, the resulting object contains its members sorted alphabetically.

  • CompareDependencyStatus

    Returns -1 if the first dependency status is less severe than the second, returns 0 if the two dependency status are equal, returns 1 if the first dependency status is more severe than the second.

  • CompareVersion

    Returns -1 if the first version is lower than the second, returns 0 if the two versions are equal, returns 1 if the first version is higher than the second.

  • ConfigurationItemServiceNowAppDependencyInsertOrUpdate

    Inserts or updates a configuration item that represents the given ServieNow application (record or object) on the given instance.

  • ConfigurationItemServiceNowAppInsertOrUpdate

    Inserts or updates a configuration item that represents the given ServieNow application (record or object) on the given instance.

  • ConfigurationItemServiceNowAppInsertOrUpdateFromList

    Inserts or updates configuration items that represent the all ServieNow apps from an array of objects representing apps.

  • ConfigurationItemServiceNowAppInsertOrUpdateFromTree

    Inserts or updates configuration items that represent the all ServieNow apps from a dependency tree object.
    Returns the Sys ID of the created or updated CMDB CI representing the application at the root of the tree.

  • ConfigurationItemServiceNowAppInsertOrUpdateLocalApps

    Inserts or updates configuration items that represent the all ServieNow applications on the instance.

  • CreatePDFFromHtml

    Create a PDF file based on html and attaches the created file as an attachment to the given record.

  • CreateQRCodeRawData

    Creates the raw data for a QRCode based on a given input string.
    The result is provided as an array of rows containing arrays of boolean values for each column.

  • CreateTechnicalUser

    Creates a new technical user based on a given name, an optional role and password. Returns the Sys ID of the new user if successful or false if the user could not be created or if the specified role could not be found.

  • CreateTestForRecord

    Creates a new test for a given record - if the type of record is supported - and adds the test to the default test suite of the application IF the application has a default test suite.

  • CreateTestUser

    Creates a new test user based on a given name. Returns the Sys ID of the new user if successful or false if the user could not be created.

  • CreateUserByEmail

    Creates a new user based on a given Email address and assigns the specified groups. Returns the Sys ID of the new user if successful or false if the email address is not valid or a user with that email address already exists.

  • CurrencyConversion

    Converts a monetary amount from one currency to another.

  • DatabaseIndexCreate

    Creates a new database index if it doesn't exist yet. Warning, there is no way to undo that operation!

  • Debug

    Produce a debug log output but only if the x_snc_devtools.logging.verbosity system property is set to "debug".

  • Deprecated

    The function is to be called from within code that is considered as deprecated - and hence is expected to be removed in a future major version. It issues a warning to the log and the screen.

  • DevToolsClientAPI

    The DevToolsClientAPI is a client callable proxy for ajax calls to some of the functions provided by DevTools.

  • DevToolsWorkerAPI

    The DevToolsWorkerAPI class contains proxy functions to functions that do lengthy operations and hence may be executed through a process worker.

  • DocumentationAPI

    The DocumentationAPI helps to render fragments of an HTML page that documents the components of a scoped application.
    |
    Methods:
    * initialize()
    * RenderHeader()
    * RenderDescription()
    * RenderListItem()
    * RenderCopyright()
    * RenderDisclaimer()
    * RenderLicense()
    * RenderRoles()
    * RenderProperties()
    * RenderTables()
    * RenderConnectionAndCredentialAliases()
    * RenderEvents()
    * RenderUIActions()
    * RenderScriptIncludes()
    * RenderUIScripts()
    * RenderBusinessRules()
    * RenderScheduledJobs()
    * RenderTestStepConfigurations()
    * RenderExtensionPoints()
    * RenderInstanceScanChecks()
    * RenderEditorMacros()
    * RenderRestApis()
    * RenderDependencies()
    * RenderTechnicalDebts()
    * RenderSystemRequirements()
    * RenderInstallationInstructionsImportFromSourceControl()
    * RenderInstallationInstructionsBackgroundScript()
    * RenderInstallationInstructionsConfigureTableCrossScopeAccess()
    * RenderInstallationInstructionsAppInstall()
    * RenderInstallationInstructionsRunTestSuite()
    * RenderError()

  • ExecuteBusinessRuleShowCredentialPollution

    Checks if the current application contains records containing credentials and displays a warning.

  • GenerateAndSendCredentialsToUser

    Generates a new password for the user, sets the user name if required, sets the password needs reset flag and sends the new credentials to the user via mail.
    This requires the "glide.email.smtp.active" system property to be "true".

  • GetAllTables

    Returns an object that contains all details of all tables, including a list of tables that are extended from a table if requested.

  • GetAppBranches

    Returns a list of all known source control branches of the application.

  • GetAppCurrentBranch

    Returns the current source control branch to which an application is linked.

  • GetAppDefaultTestSuite

    Returns the default test suite of the given application or false if the application or the default test suite does not exist.

  • GetAppManualRecord

    Returns the record of the given application's manual UI Page, or false if the application does not have a manual UI Page.

  • GetAppName

    Returns the name of a scoped application (and removes any "work in progress" postfixes).

  • GetAppRecord

    Get an application record based on sys_id or scope name.

  • GetAppRecordsWithCredentialPollution

    Returns an array with records which contain credentials contained in the given application.
    The parameter bGeneric controls if a generic search should be performed - which may catch records in tables not defined OOTB but is significantly slower.

  • GetAppScope

    Returns the scope name of a scoped application.

  • GetAppUncommittedFiles

    Returns an array of objects detailing the records that are currently not committed to the current source control branch of the given application. If the application is not linked to source control, the function returns false.

  • GetArrayValue

    Returns an array no matter what input type is given and performs necessary conversion if another type is provided.

  • GetBaseTable

    Returns the base table of the given table, or the table itself if it is not extending any other table.

  • GetBoolValue

    Returns either true or false no matter what kind of value is given.

  • GetCallStack

    Returns the call stack in a structured format.

  • GetCleanAppName

    Strips postfixes indicating unfinished work from an application name based on the given string.

  • GetConnectionAndCredentialFromAlias

    Returns an object with "url", "username", "password" and "apikey" values (which are populated depending on the credential type) if the given (http) connection alias can be resolved, otherwise false.

  • GetCountryRecord

    Get a country record based on sys_id, name or ISO3 code.

  • GetCredentialFromAlias

    Returns an object with "username", "password" and "apikey" values (which are populated depending on the credential type) if the given credential alias can be resolved, otherwise false.

  • GetCurrentRecord

    Returns the current record based on either an existing current object or (if not available) based on the current url.

  • GetCurrentScope

    Returns the currently selected scope from the user session.

  • GetCurrentUrl

    Returns the current url if possible, if not it returns the instance root url.

  • GetDatabaseViewsFromTable

    Returns the database views which use a given table.

  • GetDateNow

    Returns the current date as a string in UTC.

  • GetDependencyListFromTree

    Transforms a dependency tree into a dependency list.

  • GetDependencyTreeErrorCount

    Returns the number of errors contained in a dependency tree. If the provided dependency tree is not an object, the function returns 1.

  • GetDetailsFromCredential

    Returns an object with "apikey", "username" and "password" fields or false if the credential object is null.
    Logs an error if the details cannot be provided.

  • GetDiagnostics

    Returns system diagnostics as an object.

  • GetDictionaryOverrideRecord

    Returns the dictionary override record based on the given table and column name if it exists.

  • GetDictionaryRecord

    Returns the dictionary record based on the given table and column name. The function can also handle elements (columns) that are defined for parent tables.

  • GetEvaluatorErrorExceptionPatterns

    Returns patterns found in evaluator errors, which should be ignored - as they are produced by OOTB components.

  • GetFloatValue

    Returns a float value.

  • GetFormatConfigMultiple

    Retrieves formatting information for the fields of the given records.

  • GetFunctions

    Gets an array with the names of all functions of a given object.

  • GetGroupRecord

    Get a group record based on sys_id or name.

  • GetGroupsFromUser

    Returns all groups of a given user. An additional filter can be applied to the groups to be returned.

  • GetHash

    Generate a hexadecimal SHA 256 hash string.

  • GetInstanceListPath

    Returns the URL path of a table's list in the instance.

  • GetInstanceListURI

    Returns the URI of a table's list in the instance.

  • GetInstanceListURL

    Returns the URL of a specific record list in the instance.

  • GetInstanceName

    Returns the instance name.

  • GetInstancePipelineName

    Returns the pipeline name of the given instance. If no (technical) instance name is specified it returns the pipeline name of the current instance.
    The "pipeline name" is the name of the instance that reflects its role in the pipeline. Typical names are "dev", "test" and "prod". In order to map technical instance names to pipeline names an application must implement the DevTools extension point and implement the DevToolsGetPipelineName() function.
    If no mapping is available, the function returns the technical name of the given (or current) instance.

  • GetInstanceRecordPath

    Returns the url path of a specific record in the instance.

  • GetInstanceRecordURI

    Returns the URL path of a specific record in the instance.

  • GetInstanceRecordUrl

    Returns the URL of a specific record in the instance.

  • GetInstanceRecordURL

    Deprecated version of GetInstanceRecordUrl().

  • GetInstanceUrl

    Returns the instance root url.

  • GetInstanceURL

    Deprecated version of the function GetInstanceUrl().

  • GetIntegerValue

    Returns an integer value.

  • GetKeys

    Returns all key names of an object in an array. Returns an empty array if no object is provided or no members exist.

  • GetLength

    Returns the length of the given parameter or 0 if the parameter is not defined or null.

  • GetLinkDirectory

    Returns the DevTools link directory with many useful links for admins and developers.

  • GetMinimalCommonVersion

    Returns the minimal common version based on two lists of versions. If no common version can be identified, false is returned.

  • GetPackageDependencyList

    Retireves all dependencies of the given package as a list of objects sorted by deployment order.

  • GetPackageDependencyTree

    Retireves all dependencies of the given package as an object tree.

  • GetPackageRecord

    Get a package record based on sys_id, scope name, name or the record itself.

  • GetPackageVersion

    Returns the version of a package if it exists, otherwise false.

  • GetParam

    Returns the specified url parameter as a string value.

  • GetParentRecord

    Get the parent record of a given record if it is possible.

  • GetParentTable

    Returns the parent table of the given table. False if the given table does not exist or is not derived from another table.

  • GetProperties

    Returns all properties of a given object or an empty array if the given value has no properties.

  • GetProperty

    Gets a system property independent of its scope.

  • GetPseudoSysId

    Returns a pseudo Sys Id which is valid but VERY unlikely to exist.

  • GetRandomNumericToken

    Get a pseudo-random string token of a given length consisting of numbers only.

  • GetRecentEvaluatorErrors

    Retrieves the evaluator errors logged in the last given amount of minutes.

  • GetRecord

    Shorthand to get a record from a table based on a sys_id or a GlideRecord object. If the bNoCrossScope parameter is set to true, GetRecord will not attempt to load the record from the global scope if it cannot load it from within the application scope.

  • GetRecordFromTestStep

    Returns the sys_id of the record that has been created or found in the given test step.

  • GetRecordPath

    Returns the url path of a specific record.

  • GetRecordScopeSysId

    Returns the Sys Id of the scope of the given record, or false if the record is invalid or not derived from sys_metadata. The function also considers records that are derived from sys_scope (like sys_app or sys_store_app).

  • GetRecordUri

    Returns the uri path of a specific record.

  • GetRoleNamesFromUser

    Returns an array with the names the active roles of a user.

  • GetRoleRecord

    Get a role record based on sys_id or name.

  • GetRolesFromUser

    Returns an array with the sys_ids of the active roles of a user.

  • GetScopeSysIdFromPropertyName

    Returns the sys_id of a system property based on its name.

  • GetScriptRecord

    Returns the GlideRecord object that contains the script from which GetScriptRecord() is called or if nStackLevel is greater than 0, the record that contains the script that contains the code of the corresponding stack level.

  • GetSharedApplicationRecord

    Returns the shared application record based on the given app or shared application Sys Id.

  • GetShortUniqueString

    Returns a string that represents a version of the input string that does not exceed the specified length. The last characters are replaced by a hash-based alpha-numeric postfix to avoid string collisions.

  • GetStackTrace

    Returns the current call stack as a raw, unprocessed string.

  • GetStringValue

    Returns a string value in all cases. Arrays and objects are converted into comma separated strings.

  • GetTableFromSysId

    Returns the table of the record identified by a given sys_id.

  • GetTableRecord

    Returns the record that represents the given table.

  • GetTablesByColumnType

    Returns all tables which have at least one column with the given type.

  • GetTechnicalDebtSwitchState

    Returns the boolean state of the switch of a technical debt record if it exists, or false if it does not exist.

  • GetTestRecord

    Returns the ATF test record for the given record if a matching ATF test exists.
    Script Includes and Scan Checks are supported.

  • GetTimeNow

    Returns the number of milliseconds passed since the start of the unix epoch.

  • GetTransactionRuntime

    Returns the number of milliseconds passed since the start of this transaction.

  • GetType

    Returns the type of a value.

  • GetUserRecord

    Get a user record based on sys_id, user_name, name or email address.

  • GetValue

    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.

  • GetVariablesFromRecord

    Retrieves all variables available for a record in an object including their names and values.

  • GetVersionFromString

    Returns a semantic version string from the given string (which may be an application name including a version or a branch name).

  • GetViewRecord

    Returns a view record based on the given Sys ID, record or view title. Or false if no view record could be found.

  • GitHubAPI

    Interface to the GitHub API.
    |
    Methods:
    * initialize()
    * SetCredential()
    * SetMidServer()
    * SetBasicAuth()
    * SetApiUrl()
    * GetApiUrl()
    * Error()
    * GetRequestCount()
    * Request()
    * GetPublicReposFromOwner()
    * GetBranchesFromRepo()
    * GetFilesFromBranch()
    * GetFile()
    * ProtectBranchReadOnly()

  • GitLabAPI

    Interface to the GitLab API.
    |
    Methods:
    * initialize()
    * SetCredential()
    * SetBasicAuth()
    * SetMidServer()
    * SetApiUrl()
    * GetApiUrl()
    * Error()
    * GetRequestCount()
    * Request()
    * GetPublicProjects()
    * GetProjectPath()
    * GetTreePath()
    * GetBranchesFromRepo()
    * GetFilesFromBranch()
    * GetFile()
    * ProtectBranchReadOnly()

  • GlideRecordAddQuery

    Adds query conditions to a GlideRecord based on the given parameter. This can be either an encoded query string or an object containing columns and values to be compared directly.

  • GlideRecordDelete

    Executes the delete member function of a glide record in global scope.

  • GlideRecordDeleteMultiple

    Executes the deletemultiple member function of a glide record in global scope.

  • GlideRecordInsert

    Executes the insert member function of a glide record in global scope.

  • GlideRecordQuery

    Executes the query member function of a glide record in global scope.

  • GlideRecordRestoreLocation

    Calls the function restoreLocation on the given GlideRecord object. This function is yet another cross-scope wrapper for a function that is not available in scope for no reason.

  • GlideRecordSetValue

    Executes the setValue member function of a glide record in global scope.
    If "sys_id" is the field to be changed, the new Sys ID will only be set if the GlideRecord::newRecord() function has been executed before on the record.

  • GlideRecordSetValues

    Executes the setValue member function of a glide record in global scope for all values provided in the given object.
    If one of the keys is the "sys_id" the new Sys ID will only be set if the GlideRecord::newRecord() function has been executed before.

  • GlideRecordUpdate

    Executes the update member function of a glide record in global scope. If bGhost is set to true, the record update will not trigger any system field updates or workflows.

  • HtmlEncode

    Converts a string to html.

  • HtmlRenderDependencies

    Renders all dependencies of the given package.

  • HtmlRenderError

    Renders an error message in Html.

  • HtmlRenderImage

    Renders an image that is stored in db_image into an html document.

  • HtmlRenderInfo

    Renders an info message in Html.

  • HtmlRenderLink

    Renders an HTML link.

  • HtmlRenderLinkDirectory

    Renders a link directory with based on a given linkdirectory object.

  • HtmlRenderOrderedList

    Renders an ordered list based on an array.

  • HtmlRenderPageA4

    Renders html elements that exactly reflect a DIN A4 page to support PDF rendering.

  • HtmlRenderPageApplications

    Renders the applications overview and status page.

  • HtmlRenderPreformatted

    Render the given text as preformatted text in html.

  • HtmlRenderQRCode

    Renders a black and white QC code image based on the given payload string as plain vanilla html.

  • HtmlRenderRedirect

    Renders a script into an html output that causes a page redirect to the given url.

  • HtmlRenderRoundedBox

    Renders an html div with rounded corners.

  • HtmlRenderScript

    Renders a script in Html.

  • HtmlRenderScriptUrl

    Renders the html tag required to include a script via url (e.g. from a CDN).

  • HtmlRenderStyle

    Renders a html style tag.

  • HtmlRenderTable

    Renders a table in html.

  • HtmlRenderTabNavigation

    Renders a tab navigation, where the current tab is highlighted.

  • HtmlRenderTree

    Renders a tree structure based on a given object.

  • HtmlRenderUnorderedList

    Renders an unordered list based on an array.

  • HtmlRenderValue

    Renders any value using RenderValue() into an html document.

  • HtmlRenderWarning

    Renders an error message in Html.

  • HtmlRenderWhatRuns

    Renders a the outcome of the WhatRuns() function for the given tables.

  • HttpRequest

    Performs a single synchronous http request.
    The vInput parameter can either contain the target url as a string or a parameter object.
    Values in the parameter object are:
    - url: the url to be requested
    - method: the http verb to be used (e.g. "get", "post", etc.)
    - requestbody: the string to be sent as the request body. If provided the method is set to "post" no matter what is specified in the method parameter.
    - basicauth: An object containing values "username" and "password"
    - response: A string to specify how the result should be returned by HttpRequest. If set to "RESTResponseV2" an object is returned if the request did not run into an exception, otherwise the function returns the response body.
    - headers: An array of objects representing a header. A header object should contain values "name" and "value".
    - mid_server: the name of a MID server to be used to relay the request.

  • ImageAPI

    A class representing an image which can be used to generate BMP files or html output.
    |
    Methods:
    * initialize()
    * Reset()
    * Color()
    * ColorBlack()
    * ColorWhite()
    * ColorRed()
    * ColorGreen()
    * ColorBlue()
    * ColorToHex()
    * SetPixel()
    * GetPixel()
    * GetPixelHex()
    * MakeDemo()
    * CreateBitmapFile()
    * getLittleEndianHex()
    * HtmlRenderImage()

  • InstallApp

    Runs the AppInstall function of the given app and of all its dependencies.

  • InstallerAPI

    The InstallerAPI class supports scripted installation steps as part of the installation of a scoped app.
    |
    Methods:
    * initialize()
    * IsAborting()
    * Log()
    * Error()
    * FatalError()
    * Finish()
    * GenericAction()
    * RecordInsertOrUpdate()
    * RecordSetValue()
    * RecordDelete()
    * DictionarySetValue()
    * DictionaryOverrideSetValue()
    * DocumentationSetValue()
    * CheckTableCrossScopeAccessibility()
    * SetProperty()
    * SetHomePage()
    * SetTableAttribute()
    * SetTableColumnAttribute()
    * SetTableDefaultOrder()
    * ChoiceInsertOrUpdate()
    * DiscoverySourceInsertOrUpdate()
    * DeleteView()
    * DeleteUISection()
    * InstallGlobalSystemProperty()
    * InstallSystemPropertyCategoryMapping()
    * ActivateBusinessRule()
    * ActivateClientScript()
    * ActivateUiAction()
    * ActivateUiPolicy()
    * ActivateServicePortal()
    * ActivateModule()
    * ActivateAppMenu()
    * ActivateViewRule()
    * ActivateACL()
    * ActivateNotification()
    * ShowFieldClass()
    * ActivateRecord()
    * InsertFieldToFormSection()
    * DefineFormSection()
    * DefineList()
    * RecordTransporterPackageUnpack()

  • InstanceReset

    Makes a number of changes to OOTB records to remove or hide not needed features. Use with great care! Undoing some of these changes might be difficult.
    For safety reasons the current date (as an iso formatted string) must be passed as a parameter.

  • InstanceScanCheckOnApp

    Performs an instance scan on an application using only a specific check.

  • InstanceScanCheckOnRecord

    Performs an instance scan on a record using only a specific check.

  • InstanceScanCheckScriptOnly

    Runs a Instance Scan script only Check.

  • InstanceScanGetCheckFromQuery

    Based on a given encoded query string, the function returns the GlideRecord object of the requested Instance Scan check, false if the encoded query is unrelated to Instance Scan.

  • InstanceScanGetEncodedQueryToPreventUselessChecks

    Based on the given class name and strTypeInstance Scan check GlideRecord object the function returns the encoded query to be added to a query for a sys_metadata derived record.
    The encoded query shall prevent Instance Scan to load those records where the check will not provide any meaningful results.

  • InstanceScanGetScanResults

    Returns the result of an instance scan as a single object.

  • InstanceScanIsRunning

    Returns true if an Instance Scan scan is currently running, false if not.

  • InstanceScanIsScriptCheck

    Returns true if the given check is a script check, false if not.

  • InstanceScanPointScan

    Performs an instance scan point scan on a specific record

  • InstanceScanSuiteOnApp

    Performs an instance scan on an application using a specific suite.

  • InstanceScanSuiteOnAppWithDependencies

    Performs an instance scan using a specific suite on an application and all of the apps dependencies.

  • InstanceScanSuiteOnRecord

    Performs an instance scan on a record using a specific suite.

  • IsActive

    Returns true if DevTools is active, false if not.
    The main driver is the system property "glide.record.legacy_cross_scope_access_policy_in_script".

  • IsAppShared

    Returns true if the given application is a "shared" application - i.e. whether it has a record in x_snc_devtools_shared_application pointing to it. False if not.

  • IsArray

    Returns true if the given value is an array. False if not.

  • IsCamelCase

    Returns true if the given string is "camelCase", false if not.

  • IsClonedDictionary

    Returns true if the given sys_dictionary record is a read-only "cloned" record of a "TTP" ("Table per Partition") table.

  • IsDerivedFromTable

    Returns true if the given table (provided as a string or a GlideRecord object) is derived from the given table, false if not.

  • IsDomainSeparationInstalled

    Returns true if Domain Separation is installed on the instance. Keep in mind, domain separation may or may not be active.

  • IsEqual

    Checks if two values are equal. The function also supports arrays and can ignore the order of array elements while comparing.

  • IsExistingRecord

    Checks if the given record is really a GlideRecord object representing an existing record.

  • IsFunction

    Returns true if the given value is a function. False if not.

  • IsInteger

    Returns true if the given parameter is an integer value, returns false if not.

  • IsKebabCase

    Returns true if the given string is "kebab-case", false if not.

  • IsObject

    Returns true if the given value is an object. False if not.

  • IsPascalCase

    Returns true if the given string is "PascalCase", false if not.

  • IsPersonaRole

    Returns true if the given role is a persona role, false if not.

  • IsPolaris

    Returns true if Polaris is to be used for the current page and given or current session user.

  • IsPrimaryRequestUrl

    Returns true if the given url is most likely related to the primary request of a page load. If there is an indicator of a secondary request (that is a request that is triggered by the inital page load) the function returns false.

  • IsProperty

    Returns true if the given parameter is the name or the sys_id of an existing system property. False if not.

  • IsSnakeCase

    Returns true if the given string is "snake_case", false if not.

  • IsTableCrossScopeAccessible

    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.

  • IsTableDomainSeparated

    Returns true if domain separation is supported and active on a given table, false if not.

  • IsTechnicalUser

    If the given user is a "technical" user, the function returns true, otherwise false.

  • IsTestAvailableForRecord

    Returns true if an ATF test exists for the given record.

  • IsTestRunning

    Returns true if the current execution context is an ATF test. False if not.

  • IsTestUser

    If the given user is a "test" user, the function returns true, otherwise false.

  • IsUserAdmin

    Returns true if the user is an admin user, false if not.

  • IsUserDefaultAdmin

    Returns true if the user sys_id represents the default OOTB admin user, false if not.

  • IsUserHasRoleExactly

    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.

  • IsUserImpersonating

    Returns true if the current user session is associated with impersonated user.
    Warning: Surprisingly the function returns true when executed in a scripted ATF test step.

  • IsUserMaint

    Returns true if the current user operates as maint, false if not.

  • IsUserSecurityAdmin

    Returns true if the current user is elevated to security_admin, false if not.

  • IsValidColumn

    Returns true of the given table column exists. False if not.

  • IsValidDatabaseView

    Returns true of the given string identifies a database view. False if not.

  • IsValidEmail

    Returns true if the given string is a valid email, false if not.

  • IsValidFunction

    Returns true of the given value is a valid function. False if not.

  • IsValidRecord

    Checks if the given record is a valid glide record object. Returns true if it is, false if not.

  • IsValidSysId

    Checks if the given string is a syntactically correct sys_id. Returns true if it is, false if not.
    Considers special Sys IDs for fx_currency and the "Default view" in sys_ui_view.

  • IsValidTable

    Returns true of the given table exists. False if not.

  • IsValidUrl

    Returns true if the given string contains a valid, fully qualified Url, false if not.

  • IsValidVersion

    Returns true if the given string is a valid version number, false if not.

  • IsVersionCompatible

    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.

  • LoadMessages

    Loads all local test messages for an "application".

  • Log

    Produces a log output

  • LogError

    Produces a error log output

  • LogWarning

    Produces a warning log output

  • MaintainGroup

    Creates or updates the given group and ensures that only the given roles are assigned.

  • MakeCsv

    Creates a CSV file based on the given parameters.

  • MakeJson

    Converts an object into a JSON string.

  • MakeUrlParameters

    Returns a url parameter string based on the given parameters.

  • MakeUserName

    Returns a valid user (log) name without blanks, all lowercase based on the given string(s).

  • Merge

    Merges two objects or arrays.

  • ParseCsv

    Parses a csv formatted string into an array of objects representing each row.

  • ParseDateTime

    Parses a string and returns a time value.

  • ParseEmail

    Returns the components of an email as an object, false if the given string is not a valid email.

  • ParseJson

    Parses a string and returns an object or false in case of failure (instead of pointlessly throwing an exception).

  • ParseUrl

    Parses a Url and returns its components as an object.

  • ParseUrlParameters

    Parses a the Url parameters and returns the parameters as an object.

  • ParseXml

    Parses a given xml string and returns an object if successful, otherwise false.

  • PerformanceQuery

    Measure the average performance of a query in milliseconds from the perspective of a given user based on a defined number of repetitions.
    The result is returned as a JSON object.

  • PerformanceQueryMultiple

    Measure the average performance of a number of queries in milliseconds from the perspective of a number of given users based on a defined number of repetitions.
    The result is returned as a JSON object.

  • PrepareLogDebug

    Prepares a payload for debug log output.

  • PrepareLogError

    Prepares a payload for error log output.

  • PrepareLogInfo

    Prepares a payload for info log output.

  • PrepareLogWarning

    Prepares a payload for warning log output.

  • ProcessEvaluatorErrors

    Turns all Evaluator errors (which are logged as warnings by the platform) into real errors.

  • ProgressTrackerAPI

    The ProgressTracker class encapsulates the SNC.GlideExecutionTracker object for use within scoped applications.
    |
    Methods:
    * initialize()
    * IsInitialized()
    * Start()
    * SetPercentageProgress()
    * SetText()
    * SetResult()

  • Prompt

    Sends a prompt to an LLM.

  • RecordAttachmentAdd

    Adds an attachment to a record.

  • RecordAttachmentDeleteAll

    Delets all attachments of a given record.

  • RecordAttachmentDeleteByFileName

    Delets all attachments of a given record that match a given the file name.

  • RecordBulkProcessor

    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!
    If the ghost parameter is set to true, records are updated with setWorkflow(false) to avoid business rules etc. being triggered.

  • RecordDelete

    Deletes a single record from a table. Returns true if the record could be deleted successfully.

  • RecordGetValue

    Shorthand to get a single value from a record from a table based on its sys_id.

  • RecordInsert

    Inserts a new record into a table with the specified values if the columns exist.

  • RecordInsertOrUpdate

    Inserts or updates a record based on the given criteria.

  • RecordManageOrder

    The function managers the order field in a given table. The given Sys ID identifies the record for which a new order value should be set and respected by all other records. The new order value is the new position of the given record. If the new order value is beyond the total number of records in the table, the record will be placed at the end.
    The Sys ID and new order parameters are optional. If null, an existing order will be maintained but the order values will be put in an exact sequence, if they are not already.

  • RecordQuery

    Queries records based on the given values or based on an encoded query. The function will return a record if exactly one record is found, otherwise false.

  • RecordQueryOrInsert

    Queries an existing record based on query values or inserts a new record into a table with the specified values if the record does not exist. The bUpdate parameter controls if the existing record should be updated with the given values or not.

  • RecordSaveToUpdateSet

    Saves the given record to the current Update Set.

  • RecordSetValue

    Sets a single field value on a given record. If bGhost is set to true, no business rules are executed as a result of the update.

  • RecordSetValueJson

    Sets a single value in a json object in a field on a given record. If bGhost is set to true, no business rules are executed as a result of the update.

  • RecordTransporterGetPackageRecord

    Retrieves the given Record Transporter Package by its Sys ID or ID.

  • RecordTransporterIsValidPackageIDSuffix

    Verifies if the given Record Transporter Package ID Suffix is valid.

  • RecordTransporterPackagePackTranslatedText

    Packs all sys_translated_text records referring to application file records contained in the given package scope.

  • RecordTransporterPackageReset

    Deletes all records from a Record Transporter Package but keeps track on the Sys IDs of the deleted records to enable delta deletions in future deliveries.

  • RecordTransporterPackageUnpack

    Unpacks a given record from a Record Transporter Package.

  • RecordTransporterRecordPack

    Packs a given record into a Record Transporter Package.

  • RecordTransporterRecordUnpack

    Unpacks a given record from a Record Transporter Package.

  • RedirectToRecord

    Redirects to the form view of the given record if it is valid.

  • RedirectToUrl

    Redirects to the given url if it is valid.

  • RenderArray

    Renders an array as a text with delimiters between elements.

  • RenderBytes

    Returns a user-friendly number of bytes using KB, MB and GB where appropriate.

  • RenderCallStack

    Renders the callstack for error reporting or logging purposes.

  • RenderDate

    Renders the given date as an UTC iso string.

  • RenderDateTime

    Renders a date/time value as an UTC ISO string.

  • RenderDateTimeUser

    Renders the given date/time according to the current user's preferences.

  • RenderDebugDump

    Provides detailed debug information.

  • RenderRecordExecutionSchedule

    Renders the execution schedule for a sysauto (derived) record.

  • RenderRecordSummary

    Renders a string with a technical summary of a record including its table name, sys_id, number if available and other text data that can help to identify the record while debugging.

  • RenderTime

    Renders the given time as an UTC iso string.

  • RenderValue

    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.

  • RenderValueHex

    Render a value as a hexadecimal string.

  • RunDefaultTestSuite

    Runs the default test suite of the given application if ATF execution is active and the test suite contains only tests with server-side steps. Returns the Suite Result record if the execution took place, false if not.

  • RunDefaultTestSuitesWithDependencies

    Runs the default test suite of the given application and all of its dependencies (in reverse order) if ATF execution is active and the default test suite contains only tests with server-side steps. Returns an object containing the suite result records of all given applications, or false if the application could not be found.

  • RunScriptInGlobalScope

    Run any script in the global scope even if the context is a scoped application. 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.
    WARNING: Using this function might be considered as a violation of security policies.
    Please make sure any use is based on conscious choice and careful assessment.

  • RunScriptInScope

    Runs any script in any scope even if the context is a scoped application. 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.
    WARNING: Using this function might be considered as a violation of security policies.
    Please make sure any use is based on conscious choice and careful assessment.

  • RunTest

    Runs a test if ATF execution is enabled and the test contains only server-side steps. Returns the Test Results object if the test was executed, false if not.

  • RunTestSuite

    Runs a test suite if ATF execution is active and the test suite contains only tests with server-side steps. Returns the Suite Result record if the execution took place, false if not.

  • ScriptAutoGenerateDocumentation

    Returns a new description containing auto-generated documentation for the given script.

  • ScriptEmptyStringLiterals

    Empties all string literals contained in a script (a string).

  • ScriptGetFunctionNames

    Retrieves the names of all functions from the given script (or engine object).
    A known deficiency is that anonymous functions erroneously return with the function name of the function that receives the function as a parameter.

  • ScriptRemoveComments

    Removes all comments in a script (a string).

  • SendMail

    Sends an email if the supplied params object contains non-empty values for "subject", "body" and "recipients" and if the "glide.email.smtp.active" system property is set to true.
    The default sender name is defined in the system property "glide.email.username". It can be set using the "from" value in the params object.

  • SetAppInfo

    Sets the maintainer (team) name, maintainer email address, documentation and repository url for the given application.

  • SetAppRepo

    Sets the source code repository url for the given application.

  • SetCurrentScope

    Sets the current scope for the current user's session.

  • SetProperty

    Sets a system property independent of its scope.

  • SetValue

    Sets a value to an object (or array) that is (or is not yet) part of an recursive object (or array) without generating errors if the object (or array) does not exist yet. In case of an array, any preceding elements are added as null if they do not yet exist.

  • SetValueIncrement

    Increases a value by the given amount in an object (or array) that is (or is not yet) part of an recursive object (or array) without generating errors if the object (or array) does not exist yet. In case of an array, any preceding elements are added as null if they do not yet exist.

  • Sleep

    Sleeps for the given amount of seconds. This function serves as an alternative to gs.sleep() which is not supported in scoped apps.

  • SourceControlApplyRemoteChanges

    Applies the remote changes from the current branch of given application.
    If bAsync is set to false, the function operates synchronously and will NOT return until the operation is completed. The return false indicates success by returning true or failure by returning false.
    If bAsync is true, the function will return the progress id of the triggered background process.

  • SourceControlCommitToCurrentBranch

    Commits all uncommitted changes to the currently active branch of the given application.
    If bAsync is set to false, the function operates synchronously and will NOT return until the operation is completed. The return false indicates success by returning true or failure by returning false.
    If bAsync is true, the function will return the progress id of the triggered background process.

  • SourceControlCreateBranch

    Creates a new branch based on the currently active branch of the given application.
    If bAsync is set to false, the function operates synchronously and will NOT return until the operation is completed. The return false indicates success by returning true or failure by returning false.
    If bAsync is true, the function will return the progress id of the triggered background process.

  • SourceControlSwitchToBranch

    Switches the given application to the given branch.
    If bAsync is set to false, the function operates synchronously and will NOT return until the operation is completed. The return false indicates success by returning true or failure by returning false.
    If bAsync is true, the function will return the progress id of the triggered background process.

  • StartWorker

    The function starts a process worker using the GlideScriptedHierarchicalWorker class in the background and passes all required parameters. Returns the progress id if successful, otherwise false.

  • StopWatch

    The StopWatch class measures time in the same way as a real stopwatch does.

  • StringCheckRegEx

    Checks a given string against a regular expression.

  • StringFind

    Returns the index of the needle string within the haystack string, -1 if the needle is not contained in the haystack.

  • StringFindMultiple

    Returns an array with all indexes of the needle string within the haystack string, Returns an empty array if the needle is not contained in the haystack.

  • StringFindRegEx

    Finds a string in a string based on a regular expression.

  • StringFormat

    The function replaces numbered placeholders in the input string by the given parameters.

  • StringMatchRegEx

    Returns the first matching string based on the given input string and the regular expression. The function returns false if no matching string could be found.

  • StringPadStart

    Equivalent of the JavaScript method padStart.

  • StringRemoveCharacters

    The function returns the input string with all characters removed that are contained in the blacklist string.

  • StringReplace

    Replaces all occurrences of a string by another string in a string.

  • StringReplaceMultiple

    Replaces multiple tokens in the given string. The tokens are passed in as an array of token objects that contain a key and a value member.

  • StringReplaceRegEx

    Replaces all matches of a regular expression by another string in a string.

  • StringStripTrailingSlash

    Removes a trailing slash from a string - unless the string consist only of a single slash.

  • TableColumnSetAttribute

    Sets an attribute of a table column to a given value.

  • TableReparent

    Changes the parent table of the given table to a new parent table.
    WARNING: This function is still experimental. Handle with great care.
    Make sure your work is backed-up before use.
    When running as a background script, unset the "Record for rollback" option - otherwise the function will not work!

  • TableSetAttribute

    Sets an attribute of a table to a given value.

  • TestAPI

    The TestAPI class supports scripted tests.
    |
    Methods:
    * initialize()
    * Log()
    * SetContext()
    * SetResult()
    * GetResult()
    * TestCase_GetValue()
    * TestCase_GetRecord()
    * TestCase_GetRecord_CheckResult()
    * TestCase_RecordGetValue()
    * TestCase_IsRecordAccessibleByUser()
    * TestCase_InstanceScanCheck()
    * TestCase_InstanceScanCheck_CheckResult()
    * TestCase_InstanceScanCheckScriptOnly()
    * TestCase_InstanceScanCheckScriptOnly_CheckResult()
    * TestCase_HttpRequest()
    * TestCase_HttpRequest_CheckResult()
    * TestCase()

  • TestDataAPI

    A class to create test data records.
    |
    Methods:
    * initialize()
    * SetPrefix()
    * GetPrefix()
    * GetAllData()
    * DeleteAllData()
    * GetAllRecordsFromTable()
    * DeleteAllRecordsByName()
    * CreateRecord()
    * GetRecord()
    * CreateTestItem()
    * GetAllTestItems()
    * GetTestItem()
    * CreateUser()
    * GetAllUsers()
    * GetUser()
    * CreateGroup()
    * GetAllGroups()
    * GetGroup()
    * CreateRole()
    * GetAllRoles()
    * GetRole()
    * CreateCompany()
    * GetAllCompanies()
    * GetCompany()
    * CreateContract()
    * GetAllContracts()
    * GetContract()
    * CreateIncident()
    * GetAllIncidents()
    * GetIncident()
    * CreateIncidentTask()
    * GetAllIncidentTasks()
    * GetIncidentTask()
    * CreateChangeRequest()
    * GetAllChangeRequests()
    * GetChangeRequest()
    * CreateChangeTask()
    * GetAllChangeTasks()
    * GetChangeTask()
    * CreateProblem()
    * GetAllProblems()
    * GetProblem()
    * CreateProblemTask()
    * GetAllProblemTasks()
    * GetProblemTask()
    * CreateRequest()
    * GetAllRequests()
    * GetRequest()
    * CreateRequestItem()
    * GetAllRequestItems()
    * GetRequestItem()
    * CreateRequestTask()
    * GetAllRequestTasks()
    * GetRequestTask()
    * GetAllConfigurationItems()
    * GetConfigurationItem()
    * CreateDatabaseView()
    * GetDatabaseViewPrefix()
    * GetDatabaseViewName()
    * GetAllDatabaseViews()
    * GetDataBaseView()
    * CreateScriptInclude()
    * GetAllScriptIncludes()
    * GetScriptInclude()
    * CreateServicePortalWidget()
    * GetAllServicePortalWidgets()
    * GetServicePortalWidget()

  • TimeAddDays

    Adds (or substracts) a given number of days to (or from) a given time value (in milliseconds).

  • TransactionCacheAPI

    A class to manage the transaction cache.
    |
    Methods:
    * initialize()
    * SetContext()
    * GetContext()
    * SetItem()
    * GetItem()

  • UpdateSetDelete

    Deletes an update set including all its files.

  • UserAddRole

    Adds a role to a user if the user doesn't have the role already.

  • UserImpersonate

    Impersonates a user based on a user's sys id.

  • UxStyleSetColor

    Sets a color in a UX Style.

  • UxStyleSetValue

    Sets a single value in a UX Style.

  • WaitForWorker

    Waits synchronously until the given progress reaches a final state.

  • WhatRuns

    Identifies business rules that run for the given tables in the different CRUD operations.

UI Scripts

  • AddScriptTestStep

    Adds a "Run Server Side Script" test step to the given test.

  • AppVersionBaseline

    Client side user interface to baseline a new version for the given application.

  • ArrayAppend

    Appends the second given array to the first.

  • ArrayPushUnique

    Adds a value to an arry if it doesn't exist yet. Returns the resulting array.

  • ArrayRemoveValue

    Removes a value from an array.

  • ArrayUnique

    Returns an array with unique values only.

  • ArrayValueExists

    Checks if a value exists in an array and returns true in that case, otherwise false.

  • BindAllFunctionsToThis

    Binds all functions of the given object to the given object. This is needed to access the "this" object within every function of the class. Javascript is inherently broken and the fact that this function is even necessary can serve as proof.

  • Clone

    Creates a copy of the given value.

  • Debug

    Produces a debug output.

  • DoModalConfirm

    Displays a modal dialog with "OK" and "Cancel" options. Returns true if the user clicks "OK", false if the user clicks on "Cancel".

  • DoModalMessage

    Displays a modal message dialog.

  • DoModalProgress

    The function encapsulates a glide modal dialog using the "simple_progress_viewer" template. The function renders a progress dialog and triggers an ajax request that starts a worker process.

  • DoModalPrompt

    Displays a modal dialog with a text input field. Returns the value that is entered by the user.

  • DoModalRunTest

    Opens the dialog to choose a test runner and runs a test.

  • DoModalRunTestSuite

    Opens the dialog to choose a test runner and runs a test suite.

  • FormatAllFieldsOnPage

    Formats all fields on the page: in the form, related lists or a list view according to the format configuration provided by the backend.

  • FormatValue

    Renders a value based on a given configuration.

  • GetArrayValue

    Returns an array no matter what input type is given and performs necessary conversion if another type is provided.

  • GetBoolValue

    Returns either true or false no matter what kind of value is given.

  • GetCurrentFrameUrl

    Returns the frame's url.

  • GetCurrentRecordSysId

    Returns the current record's Sys Id. This is either the record being displayed in a form or the record for which the list context menu was opened.

  • GetCurrentRecordTableName

    Returns the current record's table name. This is the record displayed in a form or the record for which the list context menu was selected.

  • GetCurrentUrl

    Returns the current url.

  • GetElementById

    Retrieves an element from DOM by its Id. It uses different methods to get access to the element (including jquery and getElementById) to be functional in different execution contexts (forms, ui pages, etc.)

  • GetFloatValue

    Returns a float value.

  • GetFormatConfig

    Retrieves the format config using an ajax request and caches the response to avoid duplicate requests.

  • GetFormatConfigMultiple

    Retrieves the format config for multiple records using an ajax request.

  • GetFormData

    Returns an object containing all field data of the current form, or false if the current page does not contain a form.

  • GetFunctions

    Gets an array with the names of all functions of a given object.

  • GetGlideDialogClass

    Returns the best available class to render a modal Glide dialog pop-up window - if there is any.

  • GetInstanceNewRecordPath

    Returns the path to the form of the given table to create a new record.

  • GetInstanceNewRecordUri

    Returns the url to the form of the given table to create a new record.

  • GetInstanceRecordPath

    Generates a record's path.

  • GetInstanceRecordUri

    Creates the URI for the given record

  • GetIntegerValue

    Returns an integer value.

  • GetKeys

    Returns all key names of an object in an array. Returns an empty array if no object is provided or no members exist.

  • GetParam

    Retrieves a parameter supplied in the url.

  • GetParameter

    Old deprecated version of GetParam().

  • GetProperties

    Returns all properties of a given object or an empty array if the given value has no properties.

  • GetRandomBoolean

    Returns a random boolean value, either true or false.

  • GetRandomFloat

    Returns a random float value.

  • GetRandomInteger

    Returns a random integer value.

  • GetStringValue

    Returns a string value in all cases. Arrays and objects are converted into comma separated strings.

  • GetTimeNow

    Returns the number of millisenconds passed since the start of the unix epoch.

  • GetType

    Returns the type of a value.

  • GetValue

    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.

  • HtmlEncode

    Converts a string to html.

  • IdentifyRecordsOnPage

    Identifies all records that are displayed on the current page by iterating over various html elements.

  • Init

    Called when a page is loaded to invoke DevTools features.

  • InstanceScanIsRunning

    Returns true if an Instance Scan scan is currently running, false if not.

  • IsArray

    Returns true if the given value is an array. False if not.

  • IsEqual

    Checks if two values are equal. The function also supports arrays and can ignore the order of array elements while comparing.

  • IsForm

    Returns true if the current page is a form, false if not.

  • IsFormDirty

    Returns true if the form on the current page is dirty, false if not. Specify any fields that should be ignored when comparing the initial form field content with the current state.

  • IsFunction

    Returns true if the given value is a function. False if not.

  • IsInteger

    Returns true if the given parameter is an integer value, returns false if not.

  • IsList

    Returns true if the current page is a list, false if not.

  • IsObject

    Returns true if the given value is an object. False if not.

  • IsValidEmail

    Returns true if the given string is a valid email, false if not.

  • IsValidSysId

    Checks if the given string is a syntactically correct sys_id. Returns true if it is, false if not.

  • IsValidUrl

    Returns true if the given string contains a valid, fully qualified Url, false if not.

  • Log

    Produces an error log output.

  • LogError

    Produces an error log output.

  • MakeJson

    Converts an object into a JSON string.

  • Merge

    Merges two objects or arrays.

  • ObserveDOM

    Attaches a listening callback function to a DOM element.

  • ParseJson

    Parses a string and returns an object or false in case of failure (instead of pointlessly throwing an exception).

  • ParseUrl

    Parses a URL and returns its components as an object.

  • ParseUrlParameters

    Parses a the URL parameters and returns the parameters as an object.

  • RedirectToRecord

    Redirects the browser to the given record - in the same tab/window or a new one depending on the given parameter.

  • RedirectToUrl

    Redirects the browser to the given URL - in the same tab/window or a new one depending on the given parameter.

  • Reload

    Reloads the current page. If the parameter bNotIfDirty is set to true, a dirty form will not be reloaded. Specify any fields that should be ignored when comparing the initial form field content with the current state.

  • RenderValue

    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.

  • ServerRequest

    Performs an ajax request (either synchronous or asynchronous) to a defined API and function.

  • SetCurrentBrowserUrl

    Sets the url in the current browser tab. The url can be relative.

  • SetValue

    Sets a value to an object (or array) that is (or is not yet) part of an recursive object (or array) without generating errors if the object (or array) does not exist yet. In case of an array, any preceding elements are added as null if they do not yet exist.

  • SharedAppVersionBaseline

    Client side user interface to baseline the current version for the given shared application.

  • StringCheckRegEx

    Checks a given string against a regular expression.

  • StringRemoveCharacters

    The function returns the input string with all characters removed that are contained in the blacklist string.

  • StringReplace

    Replaces all occurrences of a string by another string in a string.

Test step configurations

DevTools contains the following customized test step configurations:

Extension Points

  • DevTools

    The DevTools extension point allows to extend some DevTools features.

    var DevTools = Class.create();
    DevTools.prototype = {
    	initialize: function()
    	{	
    	},
    
    	GetParentRecord: function(grRecord)
    	{
    		var IsValidFunction = x_snc_devtools.IsValidFunction;
    		if (IsValidFunction(x_this_app_scope.DevToolsGetParentRecord))
    		{
    			return DevToolsGetParentRecord(grRecord);
    		}
    		return false;
    	},	
    
    	GetLinkDirectory: function(linkdirectory)
    	{
    		var IsValidFunction = x_snc_devtools.IsValidFunction;
    		if (IsValidFunction(x_this_app_scope.DevToolsGetLinkDirectory))
    		{
    			return DevToolsGetLinkDirectory(linkdirectory);
    		}
    		return linkdirectory;
    	},
    
    	GetFormatConfig: function(grRecord)
    	{
    		var IsValidFunction = x_snc_devtools.IsValidFunction;
    		if (IsValidFunction(x_this_app_scope.DevToolsGetFormatConfig))
    		{
    			return DevToolsGetFormatConfig(grRecord);
    		}
    		return false;
    	},	
    	
    	GetApplicationStatus: function(status)
    	{
    		var IsValidFunction = x_snc_devtools.IsValidFunction;
    		if (IsValidFunction(x_this_app_scope.DevToolsGetApplicationStatus))
    		{
    			status = DevToolsGetApplicationStatus(status);
    		}
    		return status;
    	},		
    
    	RenderDebugDump: function()
    	{
    		var IsValidFunction = x_snc_devtools.IsValidFunction;
    		var strDebug = '';
    		if (IsValidFunction(x_this_app_scope.DevToolsRenderDebugDump))
    		{
    			strDebug = x_snc_devtools.GetStringValue(DevToolsRenderDebugDump());
    		}
    		return strDebug;
    	},		
    	
    	GetInstancePipelineName: function(strInstanceName)
    	{
    		var IsValidFunction = x_snc_devtools.IsValidFunction;
    		var strInstancePipelineName = '';
    		if (IsValidFunction(x_this_app_scope.DevToolsGetInstancePipelineName))
    		{
    			strInstancePipelineName =
    				x_snc_devtools.GetStringValue(DevToolsGetInstancePipelineName(strInstanceName));
    		}
    		return strInstancePipelineName;	
    	},
    
    	GetEncodedQueryToPreventUselessChecks: function(rules)
    	{
    		var IsValidFunction = x_snc_devtools.IsValidFunction;
    		if (IsValidFunction(x_this_app_scope.DevToolsGetEncodedQueryToPreventUselessChecks))
    		{
    			return DevToolsGetEncodedQueryToPreventUselessChecks(rules);
    		}
    		return rules;
    	},	
    
    	AppVersionBaselineOnFinish: function(params)
    	{
    		var IsValidFunction = x_snc_devtools.IsValidFunction;
    		if (IsValidFunction(x_this_app_scope.DevToolsAppVersionBaselineOnFinish))
    		{
    			return DevToolsAppVersionBaselineOnFinish(params);
    		}
    		return false;
    	},			
    
    	Prompt: function(vPrompt)
    	{
    		var IsValidFunction = x_snc_devtools.IsValidFunction;
    		if (IsValidFunction(x_this_app_scope.DevToolsPrompt))
    		{
    			return DevToolsPrompt(vPrompt);
    		}
    		return false;
    	},		
    
    	
    	type: 'DevTools'
    };

Business Rules

Dependencies

This app does not have any dependencies.

Technical Debts

License

Copyright 2020-2024 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.

Release Notes

1.108.0 - 2024-12-13

  1. Added class AzureDevOpsAPI to interface with the Azure DevOps API for source control operations.
  2. Added UI Script MakeJson().
  3. Added UI Script SetCurrentBrowserUrl().
  4. Added UI Script StringReplace().
  5. GetParentRecord() no longer considers the sys_scope record associated with a sys_metadata record (or derived record) if there is no explicit meaningful parent record.
  6. GetParentRecord() and the "Up" button now support the "catalog_script_client" table.
  7. GetParentRecord() and the "Up" button now supports "item_option_new" records that refer to variable sets.
  8. RecordTransporterRecordPack() now prevents packing label ("Tag") and related records. Tags are a personalization feature and should hence never be part of an application deployment.
  9. Replaced menu link to "Flow Designer" to "Workflow Studio".
  10. Added menu link to "Access Analyzer".
  11. Added more patterns to GetEvaluatorErrorExceptionPatterns().
  12. ATF Test Step Configuration "DevTools - Check scoped app sanity" no longer checks system properties as such checks are fully covered in the CodeSanity Scan Suite.

1.107.0 - 2024-11-29

  1. Extended IsValidSysId() to consider that the OOTB sys_app_application "System Import Sets" uses "import_sets" as its Sys ID.
  2. Extended ATF for GetRecord() to check if it can load the OOTB sys_app_application record "System Import Sets".
  3. GlideRecordSetValue() now converts the given value null to an empty string. This will effectively "unset" the field instead of doing nothing. This also impacts unpacking the json payloads of the Record Transporter.
  4. Improved GetPackageRecord() to avoid a warning message if the given scope is not found.
  5. GitHubAPI::Request() now also logs an error if it receives an empty or invalid response body.
  6. Auto-documentation feature is now active by default. This will add the list of methods of a class defined in a Script Include to its description automatically.
  7. UI Action "Create Technical User" is now active by default.
  8. UI Action "Create Test User" is now active by default.
  9. UI Action "Create User by Email" is now active by default.
  10. UI Action "Generate and Send Credentials" is now active by default.
  11. Added more patterns to GetEvaluatorErrorExceptionPatterns().
  12. Added the "Application" column to the "Dependency" list view.
  13. Added x_snc_devtools_dependency to the link directory.
  14. Improved test for GetTableFromSysId() to avoid dependency to OOTB CIs and hence false-negative test results.
  15. Test for HttpRequest() no longer uses example.com to avoid false-negative results in air-gapped instances.
  16. Improved installation instructions to make sure the glide.record.legacy_cross_scope_access_policy_in_script system property is created if it does not exist.

1.106.0 - 2024-11-13

  1. Added function GetViewRecord().
  2. Added UI Script ArrayRemoveValue().
  3. Added method InstallerAPI::DefineFormSection().
  4. Added method InstallerAPI::DefineList().
  5. Improved IsValidUrl() to detect more valid urls.
  6. Added section for "Generative AI Controller" to the link directory.
  7. Added more patterns to GetEvaluatorErrorExceptionPatterns().
  8. GetPackageDependencyTree() now also returns the package_class as defined by the dependency record.
  9. HtmlRenderDependencies() now renders the package type of missing store app/plugin dependencies correctly.
  10. Deprecated() now only shows a warning banner if the user has the "admin" role.

1.105.0 - 2024-11-08

  1. Added function RunDefaultTestSuite().
  2. Added function RunDefaultTestSuitesWithDependencies().
  3. The Application Overview page now also displays the date and time and results of the most recent default test suite run.
  4. The DevTools extension point now supports the Prompt() member function, which can be used to override the default behavior of the Prompt() Script Include function which uses the generic prompt capability of the Generative AI Controller plugin. Extended AppBuilder() to create the DevToolsPrompt() function.
  5. WaitForWorker() now accepts a second parameter to control how many seconds it should wait in each iteration. All DevTools functions that use WaitForWorker() now either sleep 1 or 2 seconds in each iteration.
  6. Removed test "DevTools - DevToolsWorkerAPI".
  7. InstanceReset() now also deactivates the notification "On-Call Schedule - Gaps and Conflicts".
  8. Added more patterns to GetEvaluatorErrorExceptionPatterns().
  9. AppInstall() now deactivates the ACL that prevents non-maint users from seeing all fields of a One Extend Capability (which is a defect in Xanadu as of patch 3).

1.104.0 - 2024-11-02

  1. Added function Prompt() to send a generic prompt to a large language model (LLM). Added the system property x_snc_devtools.prompt.capability to specify the capability to be used when invoking the internal API.
  2. Added chapter in manual on "Sending a Prompt to a Large Language Model (LLM)".
  3. Added function RunTest().
  4. Added function RunTestSuite().
  5. Added UI Action "Create Test" for Script Includes.
  6. Added system property "x_snc_devtools.ui.createtest_button" to control if the "Create Test" button should be visible.
  7. Added function CreateTestForRecord().
  8. GetTestRecord() is now more strict and supports global Script Includes.
  9. The "Background Scripts" menu item now points to the "modern" version and stays in the same tab.
  10. Fixed a defect in UI Script ServerRequest() that caused a client-side error if the request fails and no callback function is specified.
  11. HtmlRenderWhatRuns() caused a deprecation warning when opening the "What Runs" page. this has been fixed.
  12. Added chapter "How to unblock Instance Scan?" to the manual.

1.103.1 - 2024-10-23

  1. Fixed a defect in AppVersionBaseline() that prevented branch protection for shared applications or if an application has dependencies.

1.103.0 - 2024-10-22

  1. Added function RecordSetValueJson().
  2. Added function UxStyleSetValue().
  3. Added function InstallerAPI::UxStyleSetColor().
  4. Added function GitHubAPI::ProtectBranchReadOnly().
  5. Added function GitLabAPI::ProtectBranchReadOnly().
  6. Function AppVersionBaseline() now invokes the function AppVersionBaselineOnFinish() after baselining is complete. Added function AppVersionBaselineOnFinish() to the DevTools extension point.
  7. TestAPI now supports up to 15 parameters for a test case.
  8. HttpRequest() no longer enforces the "post" http method if a request body is provided.
  9. Added steps to protect a branch in GitHub to the manual.
  10. Added steps to protect a branch in GitLab to the manual.
  11. Added sys_es_latest_script and sys_module to the link directory.
  12. Added more patterns to GetEvaluatorErrorExceptionPatterns().
  13. Removed the "DevTools" system property category. The "DevTools Options" menu item now opens the sys_properties list view filtered by "DevTools".
  14. AppSanity() now moves any sn_pipeline_environment and sn_pipeline_pipeline records into the global scope if the tables exist.
  15. AppSanity() now moves any user specific sys_ui_list records into the global scope.

1.102.0 - 2024-10-08

  1. AppInstall() now disables the business rule "Abort delete on shaerdservice.worker" (introduced in Xanadu) that prevents a specific technical user to be renamed - which clashes with the recommended naming convention for technical users.
  2. GetInstanceRecordURL() is now marked as deprecated and will produce warning messages if used.
  3. GetInstanceUrl() now supports a fallback in case the instance is affected by PRB1590051 / DEF0315217.
  4. GenerateAndSendCredentialsToUser() no longer uses deprecated function GetInstanceURL().
  5. Added role checks in all relevant functions in DevToolsClientAPI (DEF0313691).
  6. Added more patterns to GetEvaluatorErrorExceptionPatterns().
  7. UI Action "Save" no longer switches to the record scope if the "x_snc_devtools.ui.force_scope" system property is not set to true.
  8. The "Baseline Shared App" button when invoked in Studio spawned a new tab and then started the regular baseline procedure (instead of the shared app baseline procedure). This has been fixed.
  9. InstallApp() now logs the start and end time in the summary log entry.

1.101.0 - 2024-09-10

  1. GetCallStack() now contains a workaround to a defect in GlideLog.getStackTrace() which leads to the script include "AjaxRiskUtil" to be added to the call stack for no reason (observed on some Washington instances).
  2. InstanceScanIsRunning() is now more sensitive regarding remainders of previous incomplete Instance Scans.
  3. Added table "Shared Application".
  4. Added functions IsAppShared() and GetSharedApplicationRecord().
  5. Added "Shared Applications" to the DevTools menu.
  6. Added UI Action "Go to Shared App Config".
  7. A new UI Action "Baseline Shared App" is now available to baseline "Shared Applications".
  8. Function AppVersionBaseline() is now treating "Shared Applications" differently.
  9. Added function Deprecated() to mark code as deprecated and issue warnings if used.
  10. Improved the ATF test for InstanceScanCheckOnApp() to make it more resilient and avoid flakyness.
  11. UI Script functions RedirectToRecord() and RedirectToUrl() now allow to redirect within an iframe.
  12. Added more patterns to GetEvaluatorErrorExceptionPatterns().
  13. CreateQRCodeRawData() is now handling exceptions in 3rd party library properly.

1.100.0 - 2024-08-30

  1. Vancouver is no longer actively supported.
  2. SourceControlApplyRemoteChanges(), SourceControlSwitchToBranch(), SourceControlCreateBranch() and SourceControlCommitToCurrentBranch() now uses SetCurrentScope() since otherwise the triggered processes may fail.
  3. ScriptAutoGenerateDocumentation() now considers if ScriptGetFunctionNames() returns false due to parsing errors.
  4. A regression prevented the "Save" button to set the global flag on sys_ui_script records. This has been fixed.
  5. ExecuteBusinessRuleShowCredentialPollution() will only show credential pollution on record forms that are part of a sys_app package.
  6. The parser failed to process DocumentationAPI which caused the automatic documentation feature to fail on DocumentationAPI. This has been fixed.
  7. The automatic documentation feature now also works for other scopes than DevTools.
  8. For unknown reasons the "DevTools" view for the syslog_app_scope table was no longer part of the DevTools scope. This has been fixed.
  9. AppSanity() now deletes sys_ui_list records (definitions of list layouts) for tables that do not exist.
  10. AppSanity() now sets the sys_policy for all sys_metadata records of the app to none.
  11. HtmlRenderPageEvaluatorLog() now enforces the "DevTools" view on the list.
  12. Added sys_store_app and sys_app_version to the link directory.

1.99.0 - 2024-08-22

  1. Added function MakeCsv().
  2. Added function RedirectToUrl().
  3. Refactored RedirectToRecord() to use RedirectToUrl() and added proper ATF test for RedirectToRecord().
  4. HttpRequest() now checks the given MID Server for status "Up" - to avoid throwing an exception that cannot be handled.
  5. Improved IsVaidUrl() to consider single quotes in the get query part as valid.
  6. Added sys_processor, sys_polaris_menu_config and sys_polaris_configurable_menu_item to the link directory.
  7. Added more patterns to GetEvaluatorErrorExceptionPatterns().

1.98.0 - 2024-08-16

  1. DevTools is fully tested on Xanadu.
  2. Added method GitHubAPI::SetMidServer().
  3. Added method GitLabAPI::SetMidServer().
  4. Modified RunScriptInScope() and GetCallStack() for Xanadu compatibility.
  5. Added function IsActive() that verifies if the system property "glide.record.legacy_cross_scope_access_policy_in_script" is set.
  6. UI Actions and Business Rules now only run if IsActive() returns true.
  7. HttpRequest() now supports the "method" parameter.
  8. GetTestRecord() now supports Instance Scan Checks - and hence the "Go To Test" button is available on Scan Check forms.
  9. Added logic to prevent useless checks on scan_table_check records.
  10. Improved layout for examples in HtmlRenderPageGallery().
  11. Added more patterns to GetEvaluatorErrorExceptionPatterns().
  12. AppSanity() now repairs sys_script records with invalid "null" filter_condition.
  13. The DevTools view ATF Test Suite form now shows the "name" field.

1.97.0 - 2024-07-31

  1. Added function GetEncodedQueryToPreventUselessChecks() in the DevTools extention point.
  2. Added function InstanceScanGetEncodedQueryToPreventUselessChecks() and added logic to prevent useless checks on sys_ui_page records.
  3. Added function AddScriptTestStep(), added UI Script AddScriptTestStep(), added "Add Script Test Step" UI Action on test step related list.
  4. AppSanity() now removes repo_url values from non-sys_app dependency records.
  5. AppSanity() now sets the package_class to sys_app dependency records with empty package_class.
  6. A recently added pattern in GetEvaluatorErrorExceptionPatterns() caused an invalid url which lead to the evaluator log link to break. This has been fixed.

1.96.0 - 2024-07-29

  1. Added function ScriptAutoGenerateDocumentation().
  2. Added function IsUserImpersonating().
  3. Added business rule "sys_script_include - auto documentation" to add auto-generated documentation to a Script Include description.
  4. Added system property "x_snc_devtools.code.auto_generate_documentation" to control if auto-generated documentation should be added automatically when updating code.
  5. Added method DocumentationAPI::RenderTables().
  6. Added method DocumentationAPI::RenderDependencies().
  7. Added method DocumentationAPI::RenderTechnicalDebts().
  8. Added UI Script DoModalRunTest().
  9. Added UI Script DoModalRunTestSuite().
  10. In the Technical Debt form, the ID is no longer mandatory - as not all technical debts require a switch, the switch field is hidden if the ID is left empty.
  11. Added UI Action "Run Test Suite" on the Test Suite Result form.
  12. HttpRequest() now supports MID servers.
  13. WhatRuns() now also supports UI Actions.
  14. GetRolesFromUser() now accepts the same variety of values to identify the user like GetUserRecord().
  15. InstanceScanSuiteOnApp() now properly reports progress information.
  16. Fixed a defect in InstallerAPI::DictionarySetValue().
  17. Improved error handling in GitLabAPI::Request(). Unfortunately errors are not reported in a consistent way. The change e.g. avoids an endless loop when identifying branches in a non-existing project.
  18. Business rule "sys_metadata - prevent useless checks" now only runs in non-interactive sessions.
  19. Business rule "sys_metadata - prevent useless checks" now checks if the current object is null which prevents evaluator errors in a very strange, not clearly identified corner case.
  20. Added more patterns to GetEvaluatorErrorExceptionPatterns().
  21. The Dependency form now hides the documentation and repository url fields for non custom-apps to avoid the false impression that plugins or store apps can be loaded from a source control repository.
  22. Test step config "DevTools - Check scoped app sanity" no longer checks for Script Include descriptions as this is well-covered by CodeSanity.
  23. Test step config "DevTools - Check scoped app sanity" no longer checks for UI Action comments (descriptions) as this is well-covered by CodeSanity.
  24. Test step config "DevTools - Check scoped app sanity" no longer checks for Properties that are set as is_private as this is fixed automatically in function AppSanity().
  25. ATF test for InstanceScanCheckScriptOnly() is no longer depending on an OOTB check which avoids false negatives if the OOTB check does not exist.

1.95.0 - 2024-07-06

  1. Added function GetDetailsFromCredential() for better error handling and error logging in case credentials cannot be loaded.
  2. Added function RenderCallStack().
  3. Improved error handling in GetConnectionAndCredentialFromAlias().
  4. CreateTechnicalUser() did not assign the requested role, instead the admin role was assigned. This has been fixed.
  5. CreateTechnicalUser() now returns false and deletes the user right away if the requested role could not be assigned.
  6. Added discovery_credentials, sys_connection and sys_alias to the link directory.

1.94.0 - 2024-07-04

  1. Added function ConfigurationItemServiceNowAppInsertOrUpdateFromTree().
  2. Added function ConfigurationItemServiceNowAppInsertOrUpdateFromList().
  3. Added DevTools view for the CMDB CI ServiceNow App list view.
  4. The name of a ServiceNow App CI is no longer truncated in list views.
  5. ConfigurationItemServiceNowAppInsertOrUpdate() now only adds custom applications (sys_app) to the CMDB.
  6. GetPseudoSysId() now supports the bRandom parameter to return a random pseudo Sys ID.
  7. InstallerAPI::DictionarySetValue() now displays a warning if the field "column_label" is set as that may not be sufficient to modify the text displayed in the GUI. The corresponding sys_documentation records (for multiple languages) may have to be set aswell.
  8. Before baselining the user now has to confirm a message that can be configured via the system property "x_snc_devtools.baseline.message".

1.93.0 - 2024-07-03

  1. Added method InstallerAPI::DictionaryOverrideSetValue().
  2. Added method InstallerAPI::SetTableDefaultOrder().
  3. Added function GetDictionaryOverrideRecord().
  4. Added function GetBaseTable().
  5. Added function SetAppInfo().
  6. Added function MakeUrlParameters().
  7. Added function GetAppRecordsWithCredentialPollution() and business rules on sys_app and sys_metadata to show a warning if polluted records are found.
  8. The baseline procedure now checks if there are records with credential pollution and prevents baselining in that case.
  9. Added method DocumentationAPI::RenderConnectionAndCredentialAliases().
  10. All DocumentationAPI::Render*() methods now render a text indicating that there are no records contained in the documented app.
  11. Added function GetInstanceRecordUrl() as a replacement of the deprecated GetInstanceRecordURL().
  12. Added more patterns to GetEvaluatorErrorExceptionPatterns().
  13. AppBuilder() now prevents being used on global apps.

1.92.0 - 2024-06-29

  1. HttpRequest() supports the value "response" as part of its input parameter object to control how the response of the request should be provided. If the response value is set to "RESTResponseV2" the function will return the RESTResponseV2 object if the request did not throw an exception.
  2. Improved documentation of function HttpRequest().
  3. Added more logic in business rule "sys_metadata - prevent useless checks" for table sc_cat_item (and derived tables).
  4. Added more patterns to GetEvaluatorErrorExceptionPatterns().
  5. GetParentRecord() and the "Up" button now support the "syntax_editor_macro" table. GetParentRecord() returns the script include with the exact same name in the same scope if it exists.

1.91.0 - 2024-06-21

  1. Added function InstanceScanIsScriptCheck().
  2. Added more logic in business rule "sys_metadata - prevent useless checks" for tables sys_data_source and sys_transform_entry.
  3. InstanceScanGetCheckFromQuery() now detects variants of Instance Scan queries where "active=true" is not contained - thus enabling queries to load sys_data_source records.
  4. GetDependencyListFromTree() can now manage the following scenario: Nested missing (more recent version) and non-missing dependency to the same app.
  5. MaintainGroup() now also updates the additional values on an existing group.
  6. MakeUserName() now converts all name components to strings to avoid runtime errors.
  7. RecordTransporterRecordPack() now rejects packing sys_dictionary and sys_dictionary_override records as these may have differing Sys IDs on different instances.
  8. InstallerAPI::RecordSetValue() now rejects working on sys_dictionary (or derived) and sys_dictionary_override records.
  9. AppInstall() no longer sets the logging verbosity to "debug".

1.90.1 - 2024-06-16

  1. Fixed a defect in MaintainGroup() that randomly prevented roles from being assigned to or deleted from the group.
  2. Added parameter "values" to function MaintainGroup() so that the manager, email and description of the maintained group can also be set.

1.90.0 - 2024-06-15

  1. Added function GetGroupRecord().
  2. Added function GetRoleRecord().
  3. Added function IsPersonaRole().
  4. Added function MaintainGroup().
  5. GetTableFromSysId() now also finds credential records in discovery_credentials and sys_connection quickly.

1.89.0 - 2024-06-08

  1. The previous version (number) was intentionally skipped - as a statement against right wing extremism, racism, fascism and any anti-democratic sentiment.
  2. Added new CMDB CI class: "ServiceNow App" (x_snc_devtools_cmdb_ci_appl_servicenow).
  3. Added function ConfigurationItemServiceNowAppInsertOrUpdate().
  4. Added function ConfigurationItemServiceNowAppInsertOrUpdateLocalApps().
  5. Added method InstallerAPI::ChoiceInsertOrUpdate().
  6. Added method InstallerAPI::DiscoverySourceInsertOrUpdate().
  7. Adding "DevTools" as a discovery source in AppInstall().
  8. The Dependency View page now also displays the raw data if the logging verbosity is set to "debug".

1.87.0 - 2024-06-05

  1. Added function InstanceScanCheckScriptOnly().
  2. Added method TestAPI::TestCase_InstanceScanCheckScriptOnly().

1.86.0 - 2024-06-03

  1. GitHubAPI::GetBranchesFromRepo() can now handle repositories with more than 100 branches.
  2. GitLabAPI::GetBranchesFromRepo() can now handle repositories with more than 100 branches.
  3. Added function StringReplaceMultiple().
  4. Added function GetDictionaryRecord().
  5. GetScriptRecord() now returns the GlideRecord object that contains the script from which GetScriptRecord() is called or if nStackLevel is greater than 0, the record that contains the script that contains the code of the corresponding stack level.
  6. IsTestUser() is now more strict and checks if the User ID (user_name) starts with "test.".
  7. IsTechnicalUser() is now more strict and checks the exact naming convention from the whitepaper.
  8. TestDataAPI::CreateUser() now also supports the exact naming convention for technical users.
  9. The DevTools view for sys_app now contains the "Versions" related list.
  10. CompareDependencyStatus() now supports all relevant dependency status values.
  11. Added more patterns to GetEvaluatorErrorExceptionPatterns().
  12. Added more logic in business rule "sys_metadata - prevent useless checks" for tables catalog_ui_policy and item_option_new.
  13. AppSanity() now cleans up item_option_new "save_script" fields.
  14. The ATF test for AppSetRepo() failed if DevTools was not connected to a repository. this has been fixed.
  15. The ATF test for GetInstanceUrl() now fails if glide.servlet.uri is not configured properly for the instance.
  16. AppSanity() now uses GetAppRecord() and hence allows more parameter types.
  17. InstallerAPI::DictionarySetValue() and TableColumnSetAttribute() now use GetDictionaryRecord().

1.85.0 - 2024-04-05

  1. GetRecord() now also supports parent tables.

1.84.0 - 2024-03-31

  1. The "Application Overview" page now also displays links to manual pages in global applications.
  2. The "Version Baseline" button now also checks if there is a proper section in the "Release Notes" in the application manual before the actual baseline process is started.
  3. AppVersionBaseline() now adds a new section in the manual "Release Notes" section (if it exists).
  4. Added ArrayIntersection().
  5. Added function GetAppManualRecord().
  6. Added function AppVersionBaselineCheckReleaseNotes().
  7. Added function SetValueIncrement().
  8. Added UI Script GetTimeNow().
  9. Added more patterns to GetEvaluatorErrorExceptionPatterns().

1.83.0 - 2024-03-08

  1. Utah is no longer actively supported.
  2. DevTools is fully tested in Washington.
  3. The "Baseline Version" UI Action now really triggers the full-features application baseline procedure!
  4. Added link to an application's dependencies to the application overview page.
  5. On the application overview page, the link to the manual page now loads with the navigation.
  6. On the application overview page, the current branch now links to the repository.
  7. The Dependency Tree view now displays the package class name for packages other than custom applications.
  8. InstallApp() now checks if any of the packages is not installed and returns an error in that case.
  9. Added function GetAppUncommittedFiles().
  10. Added function WaitForWorker().
  11. Added function SourceControlCommitToCurrentBranch().
  12. Added function SourceControlCreateBranch().
  13. Added function SourceControlSwitchToBranch().
  14. Added function AppVersionBaselineIsRunning().
  15. Added function GetAppBranches().
  16. UI Script function GetParameter() is deprecated and replaced by function GetParam().
  17. Added UI Script function GetCurrentUrl().
  18. Added method InstallerAPI::DocumentationSetValue() to set values in sys_documentation records.
  19. Added more patterns to GetEvaluatorErrorExceptionPatterns().
  20. The UI Action "Baseline Version" is now only displayed on the application form if the application is linked to source control.
  21. The UI action "Baseline Version" is only visible if the newly introduced system property "x_snc_devtools.ui.baseline_button" is true.
  22. Improved ATF for ParseJson().
  23. The UI Scripts GetInstanceRecordPath(), GetInstanceRecordUri(), GetInstanceNewRecordPath() and GetInstanceNewRecordUri() now support the "params" parameter to supply additonal parameters to the url.
  24. The UI Script ServerRequest() now detects if the response from the server is null and shows an error message indicating that this may be caused by a server error which may not be logged.

1.82.0 - 2024-02-29

  1. Added function IsPolaris().
  2. Added UI Script Reload().
  3. Added UI Script IsFormDirty().
  4. Added function IsClonedDictionary().
  5. Added function StringMatchRegEx().
  6. WhatRuns() now also supports Data Policies.
  7. InstallApp() now only runs installation scripts (AppInstall) contained in custom applications.
  8. InstallApp() no longer tries to execute inactive AppInstall() scripts.
  9. HtmlRenderRoundedBox() is now fully aware of Polaris default and dark themes and U16 color schemes.
  10. GetTableFromSysId() now handles sys_documentation records properly.
  11. GenerateAndSendCredentialsToUser() now returns false if the user record cannot be updated. This is the case if a user without security_admin priviliges tries to generate and send credentials for another security_admin user.
  12. Added more patterns to GetEvaluatorErrorExceptionPatterns().
  13. Added better logic to the business rule "sys_metadata - prevent useless checks" to avoid unnecessarily scanning any record in sys_dictionary or any derived table.
  14. GetParam() now also checks gs.action for parameters.
  15. Added function GetRecordUri() as a replacement of the deprecated GetInstanceRecordURI().
  16. Added link to application log to the application overview page.
  17. Added DevTools view for cmn_map_page.
  18. Added DevTools view for sys_ui_policy.

1.81.0 - 2024-02-06

  1. Added function GetAppDefaultTestSuite().
  2. The application list ui page now also contains the link to the applications' default test suite if it exists.
  3. Added UI Action "Go to Test Suite" to navigate to an application's default test suite from the application form if the test suite exists.
  4. Fixed a defect in ScriptRemoveComments() that prevented multiple block comments to be removed properly.
  5. Improved test cases for ScriptRemoveComments().
  6. UI Actions "Create User By Email", "Create Technical User" and "Create Test User" sometimes did not show. This has been fixed. The UI Actions are now associated with the sys_user table directly and no longer use current.getRecordClassName() in the condition statement. current.getRecordClassName() returns the class name of the first displayed element in a list view instead of the table being displayed (which is at least questionable behaviour).

1.80.0 - 2024-01-29

  1. Added function HtmlRenderPreformatted().
  2. Added function HtmlRenderTree().
  3. Added the link to the Studio to the "DevTools Application Overview" page.
  4. Improved the "Technical Debts" related list on the application form.
  5. The "DevTools HTML Gallery" page now documents more HtmlRender* functions and is improved.
  6. HtmlRenderRoundedBox() now considers whether polaris styles are available.
  7. HtmlRenderValue() now uses the new function HtmlRenderPreformatted() internally and by that making sure that any html text contained in the rendered value is html encoded.
  8. Improved documentation on troubleshooting when DevTools ATF tests fail.

1.79.0 - 2024-01-16

  1. Added function StringStripTrailingSlash().
  2. DevToolsWorkerAPI now supports InstallApp().
  3. InstallApp() now uses ProgressTrackerAPI to communicate progress and produces a log entry that contains a summary of which scripts ran and if they ran successfully.
  4. ProgressTrackerAPI detects if the execution context is an ATF test and in that case, does nothing. Reporting an error through the progress tracker may interfere with ATF test execution itself which also uses the progress tracker to communicate progress.
  5. Clone() now supports the bSortKeys parameter to allow for sorted keys in cloned objects.
  6. MakeJson() now always produces JSON strings with alphabetically sorted keys.
  7. RecordTransporterRecordPack() now also produces JSON payloads in transport records with alphabetically sorted keys.
  8. Improved documentation and syntax editor macro for RecordManageOrder().
  9. The business rule "sys_metadata - prevent useless checks" now also prevents unnecessary checks on records in tables sys_hub_action_input and sys_hub_action_output.
  10. Added more patterns to GetEvaluatorErrorExceptionPatterns().
  11. GetTableFromSysId() now also considers table sys_progress_worker as a priority to find Sys IDs way faster.
  12. Added "Multi Factor Authentication" section to the link directory.

1.78.2 - 2023-12-14

  1. Added Sleep() statements to ATF test "DevTools - sys_metadata - Prevent useless checks" to prevent flakyness.

1.78.1 - 2023-12-13

  1. Added more patterns to GetEvaluatorErrorExceptionPatterns().
  2. Fixed a defect in RecordTransporterPackagePackTranslatedText() - the query parameter was not applied properly. This has been fixed.

1.78.0 - 2023-12-13

  1. RecordTransporterPackagePackTranslatedText() now supports the "query" parameter to limit the sys_translated_text records to be scanned.
  2. Added the "Description" field to the Record Transporter Package.

1.77.0 - 2023-12-06

  1. Added function RecordInsertOrUpdate().
  2. Added function MakeJson().
  3. Added function GetInstanceUrl() as a replacement for the now deprecated GetInstanceURL().
  4. ATF test for HttpRequest() now also validates that the instance can query itself.
  5. IsValidSysId() now considers the string "Default view" as a valid Sys ID.
  6. Added sys_language and sys_translated_text to the link directory.
  7. GetTableFromSysId() now also considers table sys_translated_text as a priority to find Sys IDs way faster.
  8. ATF test for GlideRecordAddQuery() would fail if there are existing records in the table. This has been fixed.

1.76.0 - 2023-11-29

  1. Added function GetDiagnostics().
  2. CreateTechnicalUser() now also sets a provided role and password.
  3. GetParentRecord() and the "Up" button now also supports sys_ui_form.
  4. GetParentRecord() and the "Up" button now also supports sysevent_email_action.
  5. GetParentRecord() and the "Up" button now also supports sys_ws_query_parameter_map.
  6. Added sys_notification_category to the link directory.
  7. Corrected the description of the function GetInstancePipelineName().
  8. Added missing system properties to the DevTools system property category.
  9. Added more patterns to GetEvaluatorErrorExceptionPatterns().
  10. Added macro for AppInstall() boilerplate code.
  11. AppInstall() now fixes the defective client script "Update Name on Suffix Change" for sys_properties which adds "u_" to a scoped application's system property. The test "DevTools - Installation" verifies the fix.
  12. Added the DevTools view for sys_notification_category to show all notifications as related lists.
  13. Added ATF test "DevTools - Create and delete admin user" to verify that an admin user can be created and deleted. Some configurations prevent admin users from being deleted to ensure a minimum amount of admin users are available.

1.75.1 - 2023-11-10

  1. Added "navpage.do" to the patterns listed in IsPrimaryRequestUrl(). This resolves a defect that can be observed when the evaluator log error mechanism is active AND the system property "glide.entry.first.page.script" points to a function to be executed to determine the landing page after login.

1.75.0 - 2023-11-09

  1. Added function CreateTestUser().
  2. Added UI action "Create Test User" on the sys_user table to create new test users. The UI action is only visible if the system property "x_snc_devtools.ui.createtestuser_button" is true (which is false by default).
  3. Added function IsTestUser().
  4. Added function InstallerAPI::ActivateNotification().
  5. HttpRequest() now handles exceptions thrown by RESTMessageV2::execute().
  6. Clone() no longer produces the log message "ScopedRhinoObjectWrapper: not a wrappable type: com.glide.script.FieldGlideDescriptor".
  7. The view rule to enforce the "DevTools" view on sys_app did not work. This has been fixed.
  8. Removed specific view "DevTools App Log" and "DevTools Debug Log" - both menu items now use the "DevTools" view.
  9. AppBuilder() now sets the "DevTools" for the "Log" menu item.
  10. GetAllTables() removes most not needed "sys_" attributes from the result array to reduce memory consumption.
  11. GetTableFromSysId() now also considers tables scan_result, sys_atf_test_result and sys_atf_test_suite_result as a priority and finds Sys IDs in these tables way faster.
  12. AppInstall() now deactivates yet another "Save" UI action to avoid duplicate "Save" buttons.

1.74.0 - 2023-10-30

  1. The "Save" button now supports setting the global flag on sys_ui_script records directly. No more background script executions are required.
  2. RenderValue() no longer produces the log message "ScopedRhinoObjectWrapper: not a wrappable type: com.glide.script.FieldGlideDescriptor".
  3. Added sys_plugns to the link directory.
  4. Fixed more defect in GetDependencyListFromTree() to cover scenarios where the same dependency shows up more than once in the dependency tree.
  5. GetDependencyTreeErrorCount() now also considers the status summary.

1.73.0 - 2023-10-26

  1. Fixed a defect in GetDependencyListFromTree() that caused the dependency status summary to be reported as "ok" in case of nested missing packages.
  2. Added dependency status "incompatible_version" to CompareDependencyStatus().
  3. A new business rule prevents duplicate dependencies to be added to an application.
  4. Menu item "Query Log" no longer filters by log level.
  5. Improved installation steps order.

1.72.0 - 2023-10-22

  1. Added view rule to enforce the DevTools view on the sys_app form.
  2. Added view rule to enforce the DevTools view on the sysauto_script form.
  3. Added function RecordManageOrder().
  4. Added function GlideRecordRestoreLocation().
  5. Added function CreateTechnicalUser().
  6. Added function GetTableRecord().
  7. TestAPI::Log() can now render objects and arrays directly.
  8. RecordSetValue() - and subsequently InstallerAPI::RecordSetValue() - can now work on sys_number records properly.
  9. Added more urls to IsPrimaryRequestUrl() which have been identified in Vancouver.
  10. Added more patterns to GetEvaluatorErrorExceptionPatterns().
  11. AppSetDefaults() now sets the logging.verbosity system property to "debug".
  12. Added UI Script LogError().
  13. UI Script ServerRequest() now detects the use of the parameter "name" which is not supported since the "name" parameter must contain the function of the client callable script include to be executed.
  14. The UI action "Generate and Send Credentials" is no longer available for technical users.
  15. Added UI action "Create Technical User" on the sys_user table to create new technical users. The UI action is only visible if the system property "x_snc_devtools.ui.createtechnicaluser_button" is true (which is false by default).
  16. DocumentationAPI::RenderDescription() now supports line breaks.
  17. Improved the DevTools view for the sys_app form, added "Claimed Global App Files" related list.
  18. Improved the DevTools view for the sysauto_script form.
  19. WhatRuns() now considers the order of sysrule_view records.
  20. Added DevTools view for sys_ui_bookmark_group that contains the bookmarks related list.
  21. Added functionality that allows to create cross-scope sysrule_view records.

1.71.0 - 2023-10-06

  1. Tokyo is no longer actively supported.
  2. DevTools is fully tested with Vancouver.
  3. MakeUserName() now considers test and technical users and builds their names according to the naming convention documented in the whitepaper "A mature development and deployment process".
  4. UI Script Clone() now also handles arrays.
  5. GetValue() and UI script GetValue() now supports 10 parameters.
  6. SetValue() and UI script SetValue() now supports 10 parameters.
  7. Introduced InstallerAPI::DictionarySetValue() to modify sys_dictionary records.
  8. DocumentationAPI constructor now also accepts sys_app records and scope names (like GetAppRecord()).
  9. GetEvaluatorErrorExceptionPatterns() is now accessible to all scopes.
  10. Created script macro for GetEvaluatorErrorExceptionPatterns().
  11. Added more evaluator log exception patterns in GetEvaluatorErrorExceptionPatterns().
  12. Added ATF test for DocumentationAPI.

1.70.0 - 2023-09-27

  1. Added function HtmlRenderRedirect().
  2. Added function InstallerAPI::SetHomePage().
  3. Added function CompareDependencyStatus().
  4. Fixed a defect in GetDependencyListFromTree() that led to incorrect dependency status summaries.
  5. Improved ExecuteBusinessRuleShowRecentEvaluatorErrors() to avoid recursive calls to the "sys_metadata - show evaluator errors" business rule - and littering the script execution debug output.
  6. Refactored HtmlRenderPageEvaluatorLog() to use the new function HtmlRenderRedirect().
  7. Improved IsValidUrl() to correctly accept urls that contain round brackets "(" and ")" in the GET query part.
  8. The "Installation" ATF test now verifies that glide.caller_class.enabled is NOT to to false as this would prevent various DevTools functions to work properly.

1.69.0 - 2023-09-19

  1. Added function InstallerAPI::ActivateACL().
  2. Added more patterns to GetEvaluatorErrorExceptionPatterns().
  3. Fixed a defect in GetParentRecord().

1.68.0 - 2023-09-18

  1. Added function GetRecentEvaluatorErrors().
  2. Added a business rule for sys_metadata to display recent evaluator errors on all screens.
  3. Added function IsPrimaryRequestUrl().
  4. Improved function BusinessRuleGetOperation() to cover the case that the operation() function is not defined in a GlideRecord object.
  5. GetParentRecord() and the "Up" button now also supports sp_rectangle_menu_item.
  6. GetParentRecord() and the "Up" button now also supports sys_user.
  7. The menu item "Evaluator Log" now uses a UI Page to forward to the filtered and sorted syslog list view so that the exception patterns defined in function GetEvaluatorErrorExceptionPatterns().

1.67.0 - 2023-09-03

  1. Added UI Script GetInstanceNewRecordUri().
  2. Added UI Script GetInstanceNewRecordPath().
  3. Added UI Script GetProperties().
  4. Added UI Script GetFunctions().
  5. Added UI Script BindAllFunctionsToThis().
  6. Added business rule "sys_ux_registry_m2m_category - sort" to sort Workspaces in the menu alphabetically.
  7. GetRecord() now also accepts a GlideRecord object as the second parameter. If the GlideRecord object represents a record in the given table, the same GlideRecord object is returned.
  8. GetParentRecord() and the "Up" button now also supports sys_ui_bookmark.
  9. GetParentRecord() and the "Up" button now also supports sys_atf_test_result_step.
  10. Fixed a defect in IsValidUrl() which led to some urls not being recognized as valid (e.g. "https://www.example.com/path?").
  11. Fixed a defect in TestAPI::TestCase_GetValue(). The 6th parameter was not forwarded to the TestCase function correctly. This has been fixed. Thanks to https://github.com/jessems/ for spotting this.
  12. Improved installation instructions by putting more emphasis on setting the system property to true hat enabled cross scope scripting.

1.66.0 - 2023-08-17

  1. Added function ProcessEvaluatorErrors() to set the level of Evaluator "Warnings" to "Error" - as it should be!
  2. Added function HtmlRenderRoundedBox().
  3. HtmlRenderScript() and HtmlRenderScriptUrl() now support module scripts.
  4. Technical Debts now have the "Description" field to allow for a more detailed description of the debt.
  5. Added a message on the sysrule_view form to inform the developer on how to set a table that is defined in a different scope.
  6. The dependency "Reason" is now displayed in the application form related list.
  7. GetDependencyListFromTree() now removes the "_dependencies" field.
  8. GetDependencyListFromTree() now adds the "repo_url" field to all package objects in the "list" array for consistency.
  9. AppVersionBaseline() now updates the repository and documentation url fields of applications if possible.
  10. AppVersionBaseline() now also calls the application's AppBaseline() function if it exists.
  11. AppVersionBaseline() is now configured to be accessible from all scopes.
  12. Added chapter on "Baseline Application Version" to the manual.

1.65.0 - 2023-07-25

  1. Dependencies now contain the "Reason" field to document why the application is required.
  2. Dependencies now contain the "Package Class" field so that plugins, custom applications and store apps can be recognized.
  3. Added function GetAppCurrentBranch().
  4. Application page now shows the current branch in the overview table.
  5. Added function GetProperties().
  6. Added function GetFunctions().
  7. Added function BindAllFunctionsToThis().
  8. Added function HtmlRenderOrderedList().
  9. Added function HtmlRenderUnorderedList().
  10. Added function GetCurrentRecord().
  11. Added function GetCurrentUrl.
  12. Added function GetDependencyTreeErrorCount().
  13. Added ATF for ImageAPI. This marks full formal test coverage.
  14. GitHubAPI::GetFilesFromBranch() now delivers an array of path names (instead of the objects returned by the GitHub API).
  15. GitLabAPI::GetFilesFromBranch() now delivers an array of path names (instead of the objects returned by the GitLab API).
  16. GetParentRecord() and the "Up" button now also support cmn_schedule_span.
  17. Improved ImageAPI by using bind() for GetPixel() and SetPixel() to make sure "this" is resolved properly.
  18. Improved syntax editor macro for AppBuilder.
  19. Improved boilerplate GetPipelineInstanceName() function created by AppBuilder().
  20. InstanceReset() now deactivates the popup for user consent for usage analytics.
  21. AppBuilder() created te LogWarning() function using gs.error() instead of gs.warn(). This has been fixed.
  22. HtmlRenderDependencies() no longer displays the number of dependencies if the package is not installed.

1.64.0 - 2023-06-16

  1. Added GetDependencyListFromTree() and refactored GetPackageDependencyList() to use it.
  2. Added UI Script IsValidUrl().
  3. Added method InstallerAPI::RecordDelete().
  4. "Global" can no longer be selected as a dependency.
  5. InstallerAPI::RecordInsertOrUpdate() now supports setting the sys_id for a new record explicitly.
  6. InstallerAPI functions now consistently logs "No action required" in case there is no action required.
  7. GetParentRecord() and the "Up" button now also supports item_option_new and sys_schema_attribute_m2m.
  8. UI Script Log() now uses console.log() since jslog() is no longer supported.
  9. AppSanity() deleted roles asociated to an ACL erroneously if more than one role is associated to an ACL. This has been fixed.
  10. AppSanity() eventually deleted valid ACLs for create or delete operations which were not of type "record". This has been fixed.
  11. AppSanity() now deletes all records in sys_push_notif_app_install associated to the given app.
  12. AppSanity() now deletes records erroneously created in the application scope due to issues with PA Dashboards documented in KB0814656.
  13. ParseXml() can now deal with xml encoded line breaks.

1.63.0 - 2023-06-02

  1. Added function GetVersionFromString().
  2. Added function GetLength().
  3. RecordInsert() can now set the Sys ID explicitly.
  4. GlideRecordSetValue() can now also be used to set the Sys ID if the newRecord() function has been used on the record.
  5. GitLabAPI::GetFilesFromBranch() now supports branches with more than approx. 100 files.
  6. GitLabAPI and GitHubAPI now count the number of requests and support the ::GetRequestCount() function to return the count.
  7. SetAppRepo() now also sets the repo url in the application record and in all dependency records.
  8. Added ATF test for UpdateSetDelete().
  9. ScriptGetFunctionNames() now also works outside InstanceScan checks. Additional ATF test cases have been added.
  10. AppBuilder() now creates LogError() and LogWarning() functions.
  11. AppBuilder() now creates navigation modules for the application log filtered by scope instead of the message containing the application name.
  12. Function CreateUserByEmail() now sets the user name to all lower case letters.
  13. Added section "Create and Send Credentials" to the manual.

1.62.0 - 2023-05-03

  1. Removed deprecated table "x_snc_devtools_technical_dept".
  2. Renamed function Warning() to LogWarning() for consistency.
  3. Added function LogError() and PrepareLogError().
  4. Added function SendMail().
  5. Added function MakeUserName().
  6. Added function GenerateAndSendCredentialsToUser().
  7. Added UI action "Generate and Send Credentials".
  8. Added system property "x_snc_devtools.ui.generateandsendcredentials_button" which is "false" by default.
  9. GitLabAPI::SetApiUrl() did not add the trailing slash properly. This has been fixed.
  10. Added ATF for RecordSaveToUpdateSet().
  11. Added ATF for InstanceScanCheckOnApp().

1.61.0 - 2023-04-26

  1. Function GetTechnicalDeptSwitchState() has been named incorrectly and has been renamed to GetTechnicalDebtSwitchState().
  2. The table "x_snc_devtools_technical_dept" was also named incorrectly. A new table has been created called "x_snc_devtools_technical_debt". The old table will remain until the next release to allow for a transition. Use the following script for data migration:
    var grDept = new GlideRecord('x_snc_devtools_technical_dept');
    grDept.query();
    while (grDept.next())
    {
        x_snc_devtools.Log(grDept);
        RecordQueryOrInsert('x_snc_devtools_technical_debt',
            {
                sys_scope: grDept.sys_scope,
                id: grDept.id
            },
            {
                short_description: grDept.short_description,
                switch: grDept.switch
            },
            false);
    }
  3. Added macro for GetTechnicalDebtSwitchState().
  4. Added function TableReparent().
  5. Added function IsUserMaint().
  6. Added function CreateUserByEmail().
  7. Added the "Create User by Email" UI Action.
  8. Added function ParseEmail().
  9. Added functions Warning() and PrepareLogWarning().
  10. Added UI Script IsValidEmail().
  11. Added UI Script StringCheckRegEx.
  12. Improved function IsUserHasRoleExactly() and its ATF test to be resilient to a missing role parameter and to check test cases with and without the user parameter.
  13. Fixed defect in GitHubAPI::SetApiUrl().
  14. Added function InstanceScanGetCheckFromQuery() and refactored business rule "sys_metadata - prevent useless checks" to contain less code.
  15. Added ATF for GliderecordAddQuery().
  16. InstallerAPI now checks if the system property "glide.record.legacy_cross_scope_access_policy_in_script" is set to true before starting the installation.
  17. Improved ATF test for BusinessRuleGetOperation() which eventually failed as the test business rule scope was not set explicitly.

1.60.0 - 2023-04-07

  1. San Diego is no longer actively supported.
  2. Added function SetAppRepo() to set the url of an application repository configuration associated to an application.
  3. Added function GetInstanceName() to retrieve the instance name.
  4. Added function GetInstancePipelineName() which maps the real instance name to the pipeline name - if the DevTools extension point function GetInstancePipelineName() is implemented by another application.
  5. Added functions PrepareLogInfo() and PrepareLogDebug().
  6. HtmlRenderTable() now accepts a string containing css styles as its 3rd parameter - and hence is now compatible with the template code in the HtmlRenderTable script macro.
  7. InstanceReset() hides more (not needed) menu modules.
  8. StringFormat() was not configured to be accessible from all scopes. This has been fixed.
  9. InstallerAPI::RecordSetValue() did not check if the installation should be aborted. This has been fixed.
  10. InstallerAPI::InstallSystemPropertyCategoryMapping() now sets the scope of the category to the category mapping.
  11. The template code in script editor macro TestAPI has been simplified.
  12. Improved navigation modules in section "Debug".
  13. Moved the "Applications" navigation module to the top.
  14. Added ATF for HtmlRenderQRCode().
  15. Added ATF for BusinessRuleGetOperation().
  16. Added ATF for InstanceScanGetScanResults().
  17. Added ATF for TableColumnSetAttribute().
  18. Added ATF for AppBuilderAddTestToSuite().

1.59.0 - 2023-03-22

  1. DevTools is fully tested in Utah.
  2. Added function InstallerAPI::ActivateViewRule().
  3. AppInstall() now deactivates the "GlobalApp" view rule on global scoped application forms to allow the "DevTools" view to be used.
  4. The test step configs "DevTools - Check app dependencies" and "DevTools - Check scoped app sanity" no longer require to specify the application - it will test the application in which the test step (and the test) is contained - which is the main use case.
  5. Fixed an issue in the technical debt management documentation code snippet.
  6. InstanceReset() hides more menus.
  7. Added test for GetFormatConfig().
  8. Added test for GetFormatConfigMultiple().
  9. Added test for GetLinkDirectory().
  10. Added test for AppVersionBaseline().

1.58.0 - 2023-03-14

  1. Added function StringFormat().
  2. Added function ParseXml().
  3. Added function Base64Decode().
  4. Added function Base64Encode().
  5. Added function InstallerAPI::InsertFieldToFormSection() and updated AppInstall() accordingly.
  6. AppBuilder() no longer creates code to set the removed log.active property in AppSetDefaults().
  7. The Dependency Viewer now keeps hiding packages when using the tab navigation.
  8. Improved links in DocumentationAPI functions and in the manual.
  9. GetCleanAppName() now also trims the name to avoid leading or trailing whitespaces.
  10. Added ATF for HtmlRenderWhatRuns().
  11. Added ATF for GetCurrentScope().
  12. Added ATF for IsGhostRequiredForRecordUpdate().

1.57.0 - 2023-03-09

  1. Introduced technical debt management and the GetTechnicalDeptSwitchState() function (yes, including the typo error in the function name).
  2. Added function DocumentationAPI::RenderDescription().
  3. Added function GetMinimalCommonVersion().
  4. The Script Include and the UI Script functions GetValue() now also supports arrays as the vKey1 parameter.
  5. AddSanity() now deletes sys_atf_schedule records left behind by ATF triggered Test Suite executions.
  6. The UI Action "Save" now supports active scope switching.
  7. AppBuilder() no longer creates the log.active property and the generated Log() function no longer checks the property.
  8. The Dependency Viewer and the GetDependencyList() functions now consider incompatible version requirements for the same package from different packages.
  9. Improved rendering in the Dependency Viewer in HtmlRenderDependencies(): Dependency count is no longer displayed for circular dependencies.
  10. The Dependency Viewer page now supports the parameter hide by which a comma separated list of Sys Ids can be provided of packages that should be HIDDEN in the tree view.
  11. Added function TestAPI::TestCase_GetValue() and refactored the ATF test for GetValue().
  12. Refactored the ATF test for function IsProperty().
  13. Added sys_trigger and scan_suite_execution to the link directory.
  14. Added ATF for HtmlRenderLinkDirectory().
  15. Added ATF for ProgressTrackerAPI.

1.56.0 - 2023-02-24

  1. Removed the system property "x_snc_devtools.debug.log" is it was redundant to the system property "x_snc_devtools.logging.verbosity".
  2. Added function InstanceScanSuiteOnAppWithDependencies() to perform an Instance Scan on an application and all of its dependencies (only custom applications).
  3. Added function TableColumnSetAttribute() and InstallerAPI::SetTableColumnAttribute().
  4. Added function TestAPI::TestCase_HttpRequest().
  5. Added function IsFunction().
  6. TestDataAPI::CreateUser() now supports setting a password.
  7. Function HttpRequest() now supports basic auth.
  8. Function WhatRuns() now also considers "async_always" business rules.
  9. AppSanity() now also sets async_always for (deprecated) async business rules (https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0951770).
  10. AppSanity() now fixes the sys_scope vs. sys_package discrepancy in sys_metadata records.
  11. Added business rule "sys_metadata - sync sys_package" to sync the sys_package value to the sys_scope values.
  12. AppVersionBaseline() now works properly with global scoped applications.
  13. When running the installation scripts from the ui action "Run Install Scripts" some operations fail for unknown reasosns. Hence the ui action now only shows a message with instructions to use a background script.
  14. The DevTools Dependencies Viewer now shows the total count of packages in the list mode.
  15. AppInstall() now sets the OOTB ui action ""Import Update Set from XML" to be a list banner button.
  16. AppInstall() now adds the field "Description" to the business rule form.
  17. Added DocumentationAPI::RenderRestApis() to show information of available REST APIs.
  18. DocumentationAPI::RenderBusinessRules() now also displays the description of a business rule (if it exists).
  19. Added more ATF test cases for GetPackageDependencyList().
  20. InstanceScanSuiteOnApp() now also accepts different parameter types to specify the app (same as GetAppRecord).
  21. GetType() can now deal with objects that return null.
  22. Functions RenderValue() and Clone() can now deal with objects that do not have a default value (like "wiki" GlideElement fields as used in kb_knowledge).
  23. AppBuilder() no longer adds the call to x_snc_devtools.AppInstall() in the AppInstall() function - dependency installation should be handled via InstallApp().
  24. Function AppBuilderAddSyntaxEditorMacro() is now available for all scopes. Added ATF test and syntax edit macro for the function. Added more robust parameter validation.
  25. Function GetPackageDependencyList() now also includes circular dependency packages. And the Dependency Viewer shows the circular dependencies in the "List" view.
  26. Function InstallApp() now returns false of circular dependencies are detected.
  27. Function InstallApp() now supports the bStopOnError parameter which controls if the installation should stop after the first AppInstall() functions returns false.
  28. Refactored the ATF test for RenderValue() to use TestAPI.
  29. UI Action "Find Sys Id" now trims the input which makes it more convenient to copy and paste Sys Ids into the modal dialog.
  30. The test step configuration "DevTools - Check scoped app sanity" no longer checks if the run_as user associated to a sysauto_script is a technical user or the default admin. When running an ATF test suite via REST API call, a temporary scheduled job is created and associated with the user that triggered the REST API call. This causes the test to fail.
  31. The test step configuration "DevTools - Check scoped app sanity" no longer checks if the short_description of a sys_app is populated as this is covered by a CodeSanity check.
  32. Added sys_ws_query_parameter to the link directory.
  33. GetParentRecord() and the "Up" button now also supports sys_ws_query_parameter.

1.55.0 - 2023-02-05

  1. Added function InstallApp() to execute an application's and all of its dependencies' AppInstall() functions.
  2. Added UI Action "Run Install Scripts" on the sys_app form to execute InstallApp() for the current application.
  3. InstallerAPI::Finish() now returns true or false dependening on whether the installation activities were all successful.
  4. DocumentationAPI::RenderInstallationInstructionsAppInstall() now refers to the InstallApp() function to run an app's and it's dependencies' AppInstall() functions.
  5. Function TableSetAttribute() does not attempt to change the attributes if the attribute value is already set to the intended value and returns true.
  6. Test step configuration "DevTools - Check scoped app sanity" now also considers system properties defining the activity fields of a table.
  7. Added ATF for RedirectToRecord() - however without actually testing the function as no scripted method has been identified yet.
  8. Added ATF for InstanceReset() to verify it is NOT running if no valid safety token is provided.

1.54.0 - 2023-01-25

  1. Added function IsDerivedFromTable().
  2. Added function GetRecordScopeSysId().
  3. Function InstanceScanSuiteOnRecord() is now accessible from all scopes and added ATF test.
  4. DevToolsWorkerAPI now supports InstanceScanSuiteOnRecord().
  5. Function StartWorker() now verifies that the given script include is a valid script include api name and added an ATF test for StartWorker().
  6. Added business rule "sys_metadata - Prevent useless checks".
  7. The business rule "sys_flow_context - Set domain" now sets the global domain for flows that are configured to run as system.
  8. The Dependency Viewer "Dependency List" displayed a dependency count of 0 for each package. This has been fixed.
  9. Added table sys_progress_worker to the link directory.
  10. Added ATF for function RenderRecordExecutionSchedule().
  11. Added chapter "Dependency Management" to the manual.

1.53.0 - 2023-01-17

  1. Added "list" mode to the "DevTools Dependency Viewer" page.
  2. Added function GetPackageDependencyList().
  3. Added function HtmlRenderPageGallery().
  4. Added UI script GetFloatValue().
  5. Added UI script GetRandomFloat().
  6. Added UI script GetRandomInteger().
  7. Added UI script GetRandomBoolean().
  8. Function RenderRecordSummary() now also considers sys_name.

1.52.0 - 2023-01-04

  1. Added function IsValidUrl().
  2. Added function RenderArray().
  3. Added function RenderDebugDump().
  4. The DevTools extension point class now supports the function DevToolsRenderDebugDump() to extend the function RenderDebugDump() so that other applications can contribute additional debug information.
  5. DocumentationAPI::RenderSystemRequirements() now renders the compatible versions of dependencies properly.
  6. Added ATF for CacheFlushMenu() - but yet without any reasonable checks for success.
  7. Added ATF for HtmlRenderInfo().

1.51.0 - 2022-12-23

  1. Added page "DevTools Application Overview" and functions GetApplicationStatus() and HtmlRenderPageApplications().
  2. The DevTools extension point class now supports the function DevToolsGetApplicationStatus() to extend the "DevTools Application Overview" page with additional information.
  3. Added function IsValidEmail().
  4. Function HtmlRenderLink() can now render email links.
  5. Function HtmlRenderTable() now considers horizontal alignment ('left' or 'right') per cell.
  6. Fixed a defect in GetPackageDependencyTree() that prevented circular dependencies to be handled properly.
  7. Improved layout for the DevTools - Dependency Viewer.
  8. Added ATF test for HtmlRenderPageGallery().

1.50.0 - 2022-12-20

  1. Added function GetPackageRecord().
  2. Added function GetPackageDependencyTree().
  3. Added function CompareVersion().
  4. Function GetPackageVersion() now uses GetPackageRecord() which allows more flexibility on how to specify the package.
  5. GetParentRecord() and the "Up" button now also supports sys_package_dependency_m2m and atf_input_variable.
  6. InstanceReset() now also deactivates the "Copy Test Suite" button.
  7. Added table x_snc_devtools_dependency as a better way to manage dependencies than sys_package_dependency_m2m.
  8. Added business rule for x_snc_devtools_dependency to keep various fields in sync.
  9. Added function SyncDependency().
  10. Added function HtmlRenderDependencies().
  11. Added ui page "DevTools - Dependency Viewer" to display all dependencies of a given package.
  12. DocumentationAPI::RenderSystemRequirements() now considers the field x_snc_Devtools_documentation_url as a fallback to render the link to the app.
  13. Function AppBuilder() now also creates a dependency record for "DevTools" within the application to be built.
  14. Function GetAppRecord() now actually returns a sys_app record (with all its fields) instead of a sys_scope record.
  15. Added test case for GetValue() to show that it works with GlideRecord objects.
  16. Renamed test step configuration "DevTools - Check scoped app dependency" to "DevTools - Check app dependency" since it works with global scoped apps aswell.
  17. Added test step configuration "DevTools - Check app dependencies" to check all deocumented dependencies of the given application.
  18. Added ATF test for HtmlRenderError().

1.49.0 - 2022-12-05

  1. Added function InstanceScanCheckOnRecord() to check a single record against a single Instance Scan check.
  2. TestAPI now uses InstanceScanCheckOnRecord() which significantly accelerates test cases for Instance Scan checks.
  3. Added function InstanceScanIsRunning().
  4. TestAPI now uses InstanceScanIsRunning() to check if an Instance Scan test case can be executed right now and fails the test if not.
  5. Added UI script InstanceScanIsRunning().
  6. Added DevToolsClientAPI::InstanceScanIsRunning().
  7. Added function GetTestRecord() and IsTestAvailableForRecord().
  8. Added DevToolsClientAPI::GetTestRecord().
  9. Added Ui action "Go to Test" to navigate from a Script Include to a matching ATF test.
  10. Fixed a defect in UI script GetKeys() that caused an error if an undefined input value was provided.
  11. Added ATF test for HtmlRenderWarning().
  12. Added ATF test for IsDomainSeparationInstalled().
  13. Added ATF test for IsTableDomainSeparated().
  14. Added ATF test for IsRecordRunTestButtonCompatible().
  15. Improved the "AppBuilder" script macro.
  16. Module "Evaluator Log" now shows all entries as of the current day.

1.48.0 - 2022-11-30

  1. Added function IsTestRunning() and added required logic to TestAPI.
  2. Added UI script function IsFunction().
  3. Function InstanceScanSuiteOnApp() now sets the user that actually triggered the scan in the result record (instead of the technical user that is used to trigger the REST API call).
  4. UI script function DoModalProgress() now also supports callbacks for the case the process could not be started and for status updates.
  5. Added ATF test for function HtmlRenderScriptUrl().

1.47.0 - 2022-11-28

  1. Added function StringReplaceRegEx().
  2. Added function ScriptEmptyStringLiterals().
  3. Added function ScriptRemoveComments().
  4. Added function InstanceScanSuiteOnApp().
  5. Added function InstanceScanSuiteOnApp() to the DevToolsClientAPI class.
  6. Added function GetCurrentScope().
  7. Added class ProgressTrackerAPI (which does not yet work properly).
  8. Added class DevToolsWorkerAPI to contain proxy lengthy operations functions that can be executed through a progress worker.
  9. Added UI script function GetParameter().
  10. Added UI script function RedirectToUrl().
  11. Added UI script function RedirectToRecord().
  12. Added UI script function GetInstanceRecordUri().
  13. Added UI script function GetInstanceRecordPath().
  14. Added UI script function GetElementById().
  15. The function InstanceScanGetScanResults() now reflects the given result record Sys ID in the result object.
  16. Added business rule on sys_app to set the user's current scope to the scope of the app that is displayed.
  17. Added business rule on sys_app to set the repo url to the currently configured repo url (if it exists and no repo url has been set in the app yet).
  18. The current scope is now automatically set to the scope of the system properties category when a user navigates to the system_properties_ui page.
  19. The UI action "Find Sys ID" now opens a new tab.
  20. Added the version column in the DevTools view for table sys_app.
  21. The menu module "Applications" now links to the sys_app table.
  22. Added menu module "UI Scripts".
  23. Added "DevTools" views for Script Includes and UI Scripts.
  24. Added "System Log" to the menu.
  25. Added table sys_execution_tracker to the link directory.
  26. Added ATF for function Sleep().
  27. Added ATF for function HtmlRenderScript().
  28. Removed not needed debug log output from various UI scripts.

1.46.0 - 2022-11-14

  1. Tokyo is now supported.
  2. Added function IsInteger().
  3. Added function HtmlRenderTable().
  4. Added function HtmlRenderStyle().
  5. Added function RenderRecordExecutionSchedule().
  6. Added function DocumentationAPI::RenderScheduledJobs().
  7. Added UI script function IsInteger().
  8. Fixed a bug in TableSetAttribute() which may have caused the wrong dictionary record to be changed.
  9. Function and UI script function SetValue() can now handle arrays, too.
  10. ATF test step configuration "DevTools - Check scoped app dependency" now strips whitespaces from the version list.
  11. ATF test "DevTools - GetAllTables" now produces less output to not run into memory issues.
  12. Removed Rome support from the manual UI page template.
  13. Added DevTools website url to the manual UI page template.
  14. UI action "Baseline" - i.e. the function AppVersionBaseline() - is now also executing the AppSanity() function for the app.
  15. AppBuilder() now adds x_snc_devtools.AppInstall() to the created AppInstall() function to show how apps can also install their dependencies.

1.45.0 - 2022-11-01

  1. Added function GetAllTables() to get details on all tables (including their extension hierarchy if requested).
  2. Added function DevToolsClientAPI::GetAllTables() so that GetAllTables() can be called from the client.
  3. Added function IsCamelCase() to check if a string is "camelCase".
  4. Added function IsKebabCase() to check if a string is "kebab-case".
  5. Added function IsSnakeCase() to check if a string is "snake_case".
  6. Added function GetCleanAppName() to strip postfixes from an application name based on the given string and refactored GetAppName() to use the new function.
  7. Added function GetInstanceListURL().
  8. Added function ScriptGetFunctionNames() to get a list of all functions contained in a script (represented by a linter scan check engine object).
  9. Added business rule "sys_flow_context - Set domain" to fix the issue described in KB0998966.
  10. Function GetAppRecord() can now also get the app record by the (clean) name of the app.
  11. Function GetAppRecord() can now also be used to get store apps, since it now queries the sys_scope table (instead of sys_app).
  12. Function GetAppScope() now uses GetAppRecord() internally and hence can return the scope name based on an app's Sys ID, name, scope name or an existing record object.
  13. Function RenderRecordSummary() now also considers the title column.
  14. Function DocumentationAPI::RenderInstallationInstructionsImportFromSourceControl() now also renders a link to the application's installation instructions if required.
  15. Added "List" and "All Configurations" links to the WhatRuns page.
  16. Added the "Maintainer", "Maintainer Email", "Documentation (url)" and "Repository (url)" fields on sys_app.
  17. Added the DevTools view for sys_app to only show essential fields and the new fields to document the maintainer, documentation and repo urls.
  18. Fixed a bug in client function ServerRequest().
  19. Fixed a bug in function RecordSetValue() that prevented the ghost parameter to work properly.
  20. GetParentRecord() and the "Up" UI action now support records in sys_atf_test_suite_test and return the related sys_atf_test_suite record.
  21. The application system property x_snc_devtools.ui.force_scope can now be used to control if the user's current scope should be forced to the record scope when loading a form.
  22. Enforcing the DevTools view on the content_css form and make sure only the correct fields are displayed.
  23. Added tables sys_scope, sys_app, sys_metadata, sys_number and sys_number_counter to the link directory.
  24. Added tables sc_catalog, sc_cat_item and sc_category to the link directory.
  25. Added table sys_ui_form to the link directory.
  26. Added new section on cross-scope scripting in the manual.

1.44.0 - 2022-09-18

  1. Added function HtmlRenderScriptUrl().
  2. Added function HtmlRenderWarning().
  3. Added function HtmlRenderInfo().
  4. The message rendered by HtmlRenderError() now looks like the usual ServiceNow error message.

1.43.0 - 2022-09-17

  1. Added function GetVariablesFromRecord().
  2. Added function SetCurrentScope().
  3. Added function HtmlRenderError().
  4. Added function HtmlRenderScript().
  5. Added function IsPascalCase().
  6. Added function DocumentationAPI::RenderEditorMacros().
  7. Function GetTableFromSysId() is now public and hence added to the manual.
  8. Function GetPseudoSysId() is now public and hence added to the manual.
  9. Function GlideRecordAddQuery() is now public and hence added to the manual.
  10. Added UI script function DoModalMessage() to display a message in a modal dialog.
  11. Added UI script function DoModalConfirm() to ask the user for confirmation using a modal dialog.
  12. Added UI script function DoModalPrompt() to ask the user for a text input using a modal dialog.
  13. Added UI script function GetGlideDialogClass().
  14. Added UI script function HtmlEncode().
  15. Added a widget dependency and JS includes to use the DoModal* functions in portal widgets.
  16. Added table sys_ui_action_view to the link directory.
  17. Added tables sys_ws_definition and sys_ws_operation to the link directory.
  18. Added tables sc_item_option and sc_item_option_mtom to the link directory.
  19. Added business rule on sys_metadata to set the user's current scope to the scope of the record that is displayed.
  20. The "Save" UI action is now aware of the limitations to define a UI Action View (rule) in one scope referring to a UI Action from a different scope and displays the background script workaround.
  21. GetParentRecord() and the "Up" UI action now support records in sys_ui_action_view and return the related sys_ui_action record.
  22. GetParentRecord() and the "Up" UI action now support records in sc_item_option and sc_item_option_mtom and return the related records.
  23. GetParentRecord() and the "Up" UI action now support records in sys_ws_operation and returns the sys_ws_definition record.
  24. Added macro for AppBuilder().

1.42.0 - 2022-08-11

  1. Added UI action "Parent Table" to navigate from a list view to the parent table list view (if the table has a parent).
  2. Added function StringFindMultiple() to get all the indexes of all occurences of a needle string in a haystack string.
  3. Added function GetStackTrace() to get the raw stack trace as a string.
  4. Added function GetCallStack() to get the call stack in a structured format.
  5. Added function GetScriptRecord() to get the record that contains the script from which GetScriptRecord() is called.
  6. TestAPI::TestCase_InstanceScanCheck() now outputs the record summary for the test case.
  7. RenderValue() now supports the bCompactOutput parameter which uses RenderRecordSummary() for GlideRecord objects.
  8. GetParentRecord() and subsequently the "Up" UI action now support records in derived tables.
  9. GetParentRecord() now supports records in sys_metadata and returns the scope/app record.
  10. TestAPI::TestCase() now supports the bCompactOutput parameter which uses RenderRecordSummary() for GlideRecord objects.
  11. RenderRecordSummary() shows the api_name for sys_script_include records.
  12. Added UI script functions IsForm() and IsList().
  13. Added UI script functions GetCurrentRecordTableName() and GetCurrentRecordSysId().
  14. Added sys_ux_theme and cmn_cost_center tables to the link directory.
  15. Debug output is now prefixed by "DEBUG". The "Debug Log" module now ONLY shows debug output.

1.41.0 - 2022-07-19

  1. Added function RecordSaveToUpdateSet() and updated the UI action "Baseline version" to make use of it.
  2. Added function GetPseudoSysId() to get a VERY unlikely but valid Sys Id for testing purposes.
  3. Added table db_image, sys_ux_client_script, sys_ux_client_script_include to the link directory.
  4. Added tables from package "Product Inventory Advanced" to the link directory.
  5. ATF test "DevTools - HtmlRenderImage" is now using an image that is shipped with the DevTools application.

1.40.0 - 2022-07-07

  1. RedirectToRecord() now supports the view parameter.
  2. Added UI action "Show Table Dictionary Record".
  3. Added UI action "Baseline Version" to support the baseline of an application version.
  4. UI action "Save" now maintains the current view.
  5. UI action "Up" now maintains the current view.
  6. UI action "List" maintains the current view.
  7. GetParentRecord() now supports cmn_location, sys_ui_related_list and sys_ui_related_list_entry.
  8. TestDataAPI now supports Service Portal widgets.
  9. Added sp_page and sp_widget to the link directory.

1.39.0 - 2022-06-11

  1. Added function GetParam() to get a url parameter in different contexts.
  2. Added function HtmlRenderImage() to render an image stored in db_image into an html document.
  3. Added function GetScopeSysIdFromPropertyName() to identify the scope of a system property based on its name - no matter if the property actually exists or not.
  4. Added function GetInstanceListURI() to return a list view uri for a given table.
  5. Added function InstanceScanPointScan() to run a synchronous point scan on a record.
  6. Added function InstanceScanGetScanResults() to return the results of an instance scan in a single object.
  7. Added UI action "Show Choices" to show the choices associated to a table.
  8. SetProperty() and InstallerAPI::SetProperty() are now using GetScopeSysIdFromPropertyName() to identify the right scope when creating a system property.
  9. Added function TestAPI::TestCase_InstanceScanCheck().
  10. TestDataAPI now supports script includes.
  11. AppInstall() now makes the field class "Related Tags" visible.
  12. AppBuilder() now creates the system property "logging.verbosity" for the application and the created AppSetDefaults() functions sets the property to "info" by default.
  13. The "Save" UI action no longer shows on the "Many to Many Definition" form.
  14. GetParentRecord() can now properly handle sys_choice records that refer to sys_dictionary entries of a parent table.
  15. The manual template no longer contains Quebec as a supported platform version.
  16. Added table sys_filter_option_dynamic to the link directory.
  17. Added tables label and label_entry to the link directory.

1.38.0 - 2022-05-31

  1. Quebec is no longer actively supported.
  2. Added function InstanceReset() to remove questionable OOTB features. Handle with care!
  3. Added function CacheFlushMenu() to update the navigation menu.
  4. Added function StringFind() to encapsulate .indexOf and correct its faulty behavior with empty strings.
  5. Added function StringFindRegEx() to search for a string using a regular expression.
  6. Added function IsUserDefaultAdmin() to check a given sys_id against the OOTB default admin user sys_id.
  7. Added UI script function GetBoolValue().
  8. Added UI script function RenderValue().
  9. Added UI script function StringRemoveCharacters().
  10. Added UI script function ParseUrl().
  11. Added UI script function ParseUrlParameters().
  12. WhatRuns() now supports flows which are triggered on insert or update a record in the given table.
  13. GetAppName() is now using GetAppRecord() internally and hence accepts both the Sys ID and the scope name as input.
  14. InstallerAPI class now accepts a paramter to specify a context string used in log output.
  15. InstallerAPI now flushes the menu cache after installation.
  16. Added InstallerAPI::ActivateServicePortal() to control if a given Service Portal should be accessible.
  17. Added InstallerAPI::ActivateModule() to control if a given menu Module should be visible.
  18. Added InstallerAPI::ActivateAppMenu() to control if a given Application Menu should be visible.
  19. Added InstallerAPI::RecordSetValue() to set a single field in a given record to a new value.
  20. InstallerAPI::SetTableAttribute() now respects that an installation is aborted.
  21. AppBuilder() now uses the new context parameter of InstallAPI when creating the AppInstall() function script include.
  22. Clone() is now explicitly considering arrays - this addition was necessary due to a bug in the ServiceNow Javascript engine where arrays are unintendedly stored as references in objects.
  23. UI script ServerRequest is now properly returning false as a result of the callback function.
  24. Added Flow Designer tables sys_hub_flow and sys_flow_trigger to the link directory.
  25. Added tables pa_dashboards, pa_tabs, pa_dimensions and sys_ux_data_broker to the link directory.
  26. Added an ATF test for InstallerAPI.

1.37.0 - 2022-04-19

  1. Added function GetCountryRecord().
  2. Added function StringCheckRegEx().
  3. Added UI script function GetIntegerValue().
  4. GetParentRecord() and the "Up" UI action now support records related to the Release Management plugin.
  5. Added Release Management related tables to the link directory.
  6. Added tables sys_ui_policy, sysrule_view to the link directory.
  7. WhatRuns() now supports view rules.
  8. AppBuilder() now sets the order for the manual ui page correctly behind the menu separator.
  9. AppInstall() now disables the specific "Save" UI action on table rm_story if it exists to avoid duplicate buttons.
  10. DocumentationAPI::RenderInstallationInstructionsImportFromSourceControl() now supports the additional parameter bAdditionalSteps to control if the reader should be advised to perform additional steps during installation that are documented for the given app.

1.36.0 - 2022-04-08

  1. San Diego is now supported.
  2. Added function CreateQRCodeRawData() to generate the raw data for a QRCode.
  3. Added function WhatRuns() to identify which business rules run on a table for the different CRUD operations - currently supporting insert, update and query. A corresponding UI action has also been added on forms and lists.
  4. Added function HtmlRenderQRCode() to render a QR code as plain vanilla html.
  5. Added the ImageAPI class to craft wonderful images and render them as plain html code or bmp files.
  6. Added function GetAppRecord() to get a record object of an app either by its Sys ID or its scope name.
  7. Added function HtmlRenderValue() to output any value into an html document.
  8. Added function RenderValueHex() to render a value as an hexadecimal string.
  9. Added function StringReplace() to replace strings in strings.
  10. Added function CreatePDFFromHtml() to render a pdf file based on html and add it as an attachment.
  11. Added function RecordAttachmentAdd() to add an attachment to a given record.
  12. Added function RecordAttachmentDeleteAll() to delete all attachments of a given record.
  13. Added function RecordAttachmentDeleteByFileName() to delete all attachments that match the given file name of a given record.
  14. Added function RenderTime() to render a date time value as an UTC ISO string.
  15. Added UI script function IsValidSysId() - however the function does not yet support currencies.
  16. GetTableFromSysId() is now using cross-scope techniques to identify records in the various tables - avoiding errors caused by cross-scope restrictions.
  17. DocumentationAPI::RenderListItem() now checks the text parameter properly and does not show "null" if the text is not provided.
  18. InstallerAPI::SetProperty() now creates a property if it does not exist yet.
  19. SetProperty() now supports the bAdd parameter to control if a non-existing system property should be created. New system properties are created in the global scope.
  20. AppInstall() now sets the system property "sn_g_app_creator.allow_global" to true to allow users to create global scoped applications.
  21. AppInstall() now unhides the "Email" field class so that it can be used by developers.
  22. Added tables sys_ux_form_action, sys_ui_page and sys_public to the link directory.
  23. Added tables from the "Data Model for Order Management" plugin to the link directory.
  24. The test step configuration "DevTools - Check scoped app sanity" now checks for system properties which do not have the scope name as a prefix.
  25. Test step configuration "DevTools - Check scoped app sanity" now checks for empty description fields in roles.
  26. The manual template used by AppBuilder() is now also including documentation of contained roles.
  27. The "debugrecord" macro is now producing code that works from other scopes, too.
  28. The "List" button now saves the current record before navigating to the list view.
  29. The "Find Sys ID" UI action now provides feedback if an invalid Sys ID was provided.
  30. When using AppBuilder() to built new apps, the bootstrapped manual ui page now also contains instructions to load the app from a source control repository.
  31. The ATF test "DevTools - Implementation" now checks for any UI view that starts with "exp_dtemp" in the DevTools scope explicitly.
  32. Refactoring of code to avoid the [0] anti-pattern.

1.35.0 - 2022-03-15

  1. Added security warnings to the manual and the documentation and source code of function RunScriptInScope() and RunScriptInGlobalScope().
  2. HtmlRenderLinkDirectory() now supports the title value in the link directory.
  3. GetParentRecord() now supports scan_check and its derived record classes.
  4. Added tables cmn_location item_option_new, item_option_new_set and sc_item_variables_task to the link directory.
  5. Added instance scan related tables to the link directory.
  6. Added script editor macro "debugrecord" to add code that renders a record summary into the debug log.
  7. More evaluator errors are filtered out in the "Evaluator Log" module which are caused by OOTB components.

1.34.0 - 2022-02-24

  1. Added table sys_documentation to the link directory.
  2. RunScriptInScope(), IsValidTable(), IsValidColumn(), GetParentTable() and IsUserHasRoleExactly() now use the transaction cache to avoid repetitive database queries.
  3. IsUserHasRoleExactly() has been optimized to determine the user role in one query.
  4. PerformanceQuery() no longer defaults to the current user of no or an invalid user was specified. In such cases it will return false.

1.33.0 - 2022-02-17

  1. Added function IsDomainSeparationInstalled() to determine if the domain separation plugin is installed.
  2. Function GetArrayValue() now works properly on GlideRecord fields (which are objects of type ScopedGlideElement).
  3. Added tables related to "Automated Testing Framework" to the link directory.
  4. Added domain separation related tables to the link directory.
  5. Added tables related to "Asset Lifecycle Management" to the link directory.
  6. The table ast_contract is now under "Contract Management" in the link directory.
  7. The tables sys_app and sys_plugin have been removed and the table sys_package has been added under "Apps" in the link directory.
  8. Added tables related to "Customer Service Management" to the link directory.
  9. Added tables related to "Product Catalog Management" to the link directory.
  10. Added tables related to "Customer Service Install Base Management" to the link directory.
  11. Added tables related to "Order Management for Telecommunications" to the link directory.
  12. Added catalog_script_client table to the link directory.
  13. Business rule "sys_script_client - set table to global" now only acts on Client scripts (and not on derived tables like "Catalog Cliient Scripts")
  14. Function IsTableDomainSeparated() no longer requires the sys_domain_path column to be present in a table.
  15. Function GetAppName() now also removes a " HOTFIX" postfix.
  16. The "Start" page has been renamed to "Manual".
  17. DocumentationAPI::RenderLicense() did not use the application name (was displaying "DevTools" instead). This has been fixed.

1.32.0 - 2022-01-28

  1. Added tables sys_index, sys_ui_bookmark_group and sys_ui_bookmark to the link directory.
  2. GetTableFromSysId() now ignores tables starting with "sn_esign_".
  3. The global system property "glide.script.block.client.globals" is now created during installation if it does not exist yet.
  4. Test step configuration "DevTools - Check scoped app sanity" now checks for an empty description field in system properties.
  5. Test step configuration "DevTools - Check scoped app sanity" no longer objects records in sys_index associated to the app.
  6. IsTableDomainSeparated() did not work properly if the domain separation system property does not exist. This has been fixed.
  7. The "Create Macro" UI action produced incorrect source code. Syntax editor macros for TimeAddDays(), IsTableDomainSeparated() and AppGetScope() were created incorrectly. This has been fixed.
  8. Added chapter "Service Portal Deactivation" to the documentation.

1.31.0 - 2022-01-13

  1. Paris is no longer actively supported.
  2. Introduced the Field Formatting Feature to display float values nicely in forms and lists.
  3. Control whether a Service Portal is active by setting the 'Active' flag on records in sp_portal.
  4. Added function TimeAddDays() to add a number of days to a given numeric time value.
  5. Added function SetValue() to set a value in a recursive object.
  6. Added function ArrayPushUnique() to add a value to an array if it doesn't exist yet.
  7. Added function GetAppScope() to get the scope name of an application based on its Sys Id.
  8. Added function IsTableDomainSeparated() to check if domain separation is active and supported on a given table.
  9. Merge() now also merges arrays including arrays within nested objects.
  10. Function GlideRecordInsert() now also supports the ghost mode in which it avoids the execution of business rules during insert.
  11. Added UI Script function ObserveDOM() to attach an oberving callback function to a DOM element.
  12. Added UI Script function ServerRequest() to make an Ajax API call to a server-sided script include class.
  13. Added UI Script functions Log(), Debug(), GetType(), IsEqual(), IsObject(), IsArray(), ArrayPushUnique(), ArrayValueExists(), GetKeys(), GetArrayValue(), ParseJson(), Merge(), Clone(), GetValue() and SetValue() which are equivalent to their server-sided script include counterparts.
  14. Added method InstallerAPI::ActivateUiPolicy() to set an existing UI Policy active or inactive during installation.
  15. RecordBulkProcessor() is now aware of lengthy record processing and multiple scheduled jobs running in parallel.
  16. DocumentationAPI::RenderRoles() now renders links to the role record pages.
  17. Added business rule "sys_script_client - set table to global" to allow global Client Scripts. OOTB the option of defining global Client Scripts is disabled. This business rule fixes this issue by setting an empty table field to "global".
  18. HtmlEncode() now also converts new line characters to line break html tags.
  19. Test "DevTools - CurrencyConversion" failed if the instance was set up after september 2021 as ECB exchange rates are not loaded historically. The test now uses the default rate supplied in an OOTB instance.
  20. Test step configuration "DevTools - Check scoped app sanity" now checks if a sys_ui_script has a description.
  21. Added tables sp_portal, sys_script_client, sys_ui_script and fx_system_rate to the link directory.
  22. Link to table sys_app_application in the link directory did not work. This has been fixed.
  23. Hardened CurrencyConversion() against invalid parameters.
  24. The new form link UI action "Create Macro" on the script include form helps to create a syntax edit macro to access a function or class defined in that script include.
  25. The global "Save" button is now ONE UI Action for both insert and update operations.
  26. AppBuilder() had a defect that cause the IsActive() function in the target application not to work correctly. This has been fixed.
  27. InstallerAPI.SetProperty() was defective and did not set properties correctly. This has been fixed.
  28. The AppInstall() script now also sets the system property "glide.script.block.client.globals" to false to enable global client-sided scripts and hence all client-side DevTools capabilities.
  29. Added system property "logging.verbosity" to control DevTools log output. Debug() is now using gs.debug() to produce debug output. AppInstall() sets "logging.verbosity" to "debug" which is the default setting.

1.30.0 - 2021-12-08

  1. Added function StringPadStart() to compensate the missing Javascript function padStart.
  2. Added function RenderDate() to render the given date/time as an UTC iso string.
  3. Added function RenderDateTimeUser() to render the given date/time according to the current user's preferences.
  4. GetRecord() now checks if the given table actually has the sys_id column and returns false if not.
  5. GetTableFromSysId() ran into errors when trying to search fenced tables like sn_hr_* and sn_doc_*. These tables are now ignored.
  6. IsUserHasRoleExactly() did not work correctly of no user sys_id was specified (which should imply to assume the current user). This has been fixed.

1.29.0 - 2021-12-07

  1. AppBuilder() now creates a manual page based on a template. A perfect start for app documentation.
  2. Added function DocumentationAPI::RenderInstanceScanChecks() to document instance scan checks contained in the app.
  3. IsValidVersion() now considers version numbers consisting of four components as valid.
  4. GlideRecordQuery() does not work on table sys_app_module. A fix is implemented. This has caused the AppBuilder() function to create duplicates of application menu modules.
  5. GlideRecordAddQuery() was defective when using an encoded query string. This has been fixed.
  6. HtmlRenderLinkDirectory() now supports query, order and order_direction parameters in the link directory.
  7. Tables sys_app_module and sys_app_application have been added to the link directory.
  8. GetParentRecord() now also supports sys_app_module and sys_choice.
  9. Added InstallerAPI::RecordInsertOrUpdate() to add and/or update records during installation in a generic and flexible way.
  10. AppBuilder() produced a defective AppInstall() function. When creating the InstallerAPI object, the DevTools scope was missing. This has been fixed.
  11. Removed the "Event" section from the DevTools menu because all relevant links are now contained in the link directory.
  12. Removed the outdated security notice from the documentation.

1.28.1 - 2021-12-02

  1. Improved the rendering of the link directory.
  2. Fixed a defect in AppBuilder() that prevented creating the "Log" module properly.

1.28.0 - 2021-12-01

  1. Added function RecordQueryOrInsert() to retrieve a record based on a set of criteria and create the record if it doesn't exist using a set of given values.
  2. Added function RecordQuery() to retrieve exactly one record based on the given query object or string. Returns false if no record is found or the criteria identify multiple records.
  3. Added function GlideRecordSetValues() to set multiple values on a GlideRecord object at once.
  4. Added function CurrencyConversion() to convert a monetary amount from one currency to another.
  5. Added function GetFloatValue() to convert a given value into a floating point number.
  6. Added GetProperty() to receive the value of a system property using its defined type.
  7. Added GetDateNow() to return the current date (UTC) as an ISO-formatted string.
  8. Added the global "Save" button and the system property x_snc_devtools.ui.save_button to control its visibility.
  9. Function TestDataAPI::GetAllUsers() now also provides the groups of a user.
  10. Function TestDataAPI::GetAllGroups() now also provides the users of a group.
  11. Added function DocumentationAPI::RenderUIScripts() to auto-document UI scripts contained in an app and added the chapter in the DevTools documentation.
  12. Added function TestDataAPI::GetAllConfigurationItems().
  13. IsValidSysId() now also supports currency codes as they are used as sys_ids in fx_currency.
  14. Test step configuration "DevTools - Check scoped app sanity" now checks if a sys_app_module title matched the sys_name and AppSanity() fixes that in case it is required.
  15. Tables sysevent_register, sysevent_email_action, sys_script_email, sys_properties_category, sys_properties_category_m2m, var_dictionary, sys_variable_value, sys_ui_style, sys_dictionary_override, fx_rate, sys_decision, sys_decision_input and sys_decision_question have been added to link directory.
  16. GetParentRecord() now also supports sys_ui_style, sys_dictionary_override, fx_rate, sys_decision_input and sys_decision_question.
  17. AppBuilder() now also adds a test suite and a module in the application menu.
  18. AppBuilder() adds test "Implementation" and "Installation" to the app's test suite.
  19. AppBuilder() creates application menu module "Log".
  20. Fixed a defect in RedirectToRecord() that should have prevented the function from working at all (which it didn't).
  21. RenderValue() no longer produces an error when a JavaObject is used as the parameter. However it cannot render it properly.
  22. Removed Debug*() and Log() functions from TransactionCacheAPI and TestDataAPI classes.

1.27.1 - 2021-11-19

  1. A defect prevented the "Find Sys ID" UI action to be visible. This has been fixed.

1.27.0 - 2021-11-18

  1. Added function RedirectToRecord() to redirect the user agent to the given record.
  2. Added function ParseCsv() to convert a string containing csv formatted data into an array of objects representing the data rows.
  3. HttpRequest() now supports headers and sending a request body.
  4. Test step config "DevTools - App sanity" now checks if test steps' copied_from fields are empty.
  5. AppSanity() function now also accepts a scope name.
  6. AppSanity() now also clears all test steps' copied_from fields.
  7. GetParentRecord() now supports sys_ui_policy_rl_action, sys_ui_policy_action, sys_ui_policy, sys_ui_section, sys_ui_element, sys_ui_list and sys_ui_list_element.
  8. Added cmdb_rel_type, sys_ui_policy_rl_action, sys_ui_policy_action, sys_ui_policy, fx_currency, sys_glide_object, sys_ui_section, sys_ui_element, sys_ui_list and sys_ui_list_element to GetLinkDirectory().
  9. AppBuilder() creates the script include for the AppInstall() function.
  10. AppBuilder() creates the "active" system property.
  11. AppBuilder() creates the "log.active" system property und the Log() function respects if the property is set to true.
  12. AppBuilder() creates the script include for the IsActive() function.
  13. AppBuilder() creates the script include for the AppGetProperty() function.
  14. HtmlRenderLinkDirectory() now also renders links specified directly using a url.
  15. TestDataAPI::CreateRequestTask() now uses the third paramter as the opened_by user instead of the assigned_to user for consistency.
  16. Added function InstallerAPI::ShowFieldClass() to show or hide a field class during installation.
  17. GetTableFromSysId() has been improved significantly. Various tables are excluded and tables are searched in a way that makes it more probably that records are found faster.
  18. AppInstall() now unhides the "UI Action List" field class so that it can be used by developers.

1.26.0 - 2021-11-10

  1. Added the new "Links" page with the new link directory with many useful links for admins and developers. The new function GetLinkDirectory() returns the standard DevTools link directory. The directory can be extended using the DevTools extension point.
  2. Removed the "Access Control" sub menu and the "Cross Scope Privileges" module.
  3. Added function RecordInsert() to add a new record into a table with a given set of values.
  4. Added function RecordGetSummary() to render a short hand summary of a record for debugging.
  5. Added function IsExistingRecord() to check if a given GlideRecord object represents an existing record.
  6. Added functions TestAPI::Get*() to get the Sys ID of the corresponding test data item.
  7. Added function TestAPI::TestCase_GetRecord() to check if a record exists.
  8. Added function TestAPI::TestCase_RecordGetValue() to check the value of a field in a given record.
  9. Added function TestAPI::TestCase_IsRecordAccessibleByUser() to check if a given user has access to a given record.
  10. Added function GetInstanceListPath() to generate the path component to access a list view.
  11. Added function HtmlRenderLink() to render the html for a link.
  12. Added function IsUserAdmin() to check if the current or a given user has the admin role.
  13. Added function GetShortUniqueString() to render unique strings and avoid naming collisions.
  14. Added function ParseURL() to return the components of a url in an object.
  15. Added function ParseUrlParameters() to return the key value pairs of a url parameter string in an object.
  16. Added method InstallerAPI::ActivateUiAction() to set an existing UI Action active or inactive during installation.
  17. Added support for core_comapany and ast_contract in TestDataAPI class.
  18. Added function GetRoleNamesFromUser() to get the names of the active roles of a user.
  19. Functions IsUserSecurityAdmin() and IsUserHasRoleExactly() now support a parameter to specify a user to check.
  20. The new UI Action "Find Sys ID" asks the user for a sys id and then redirects the browser to the record form page. That's a real killer feature!
  21. The new UI Action "Execute Now" replaces the OOTB "Execute Now" UI Action on sysauto_script. It triggers the execution, stays on the current form and displays a message that the job has been triggered for execution.
  22. AppInstall() now deactivates the OOTB UI action "Execute Now" on sysauto_script.
  23. TestAPI::TestCase() now uses strict comparison ("===") when comparing the expected value with the result. Affected tests have been adapted accordingly.
  24. GetTableFromSysId() now checks if the sys_id field exists before trying to find the record - thus making the process faster and more robust.
  25. GetTableFromSysId() checks the sys_package, domain, core_company and ast_contract tables first to cover more of the more likely use cases without doing the full scan through all tables.
  26. IsTechnicalUser() now checks parameters against invalid and empty values and returns false if there are multiple technical users sharing the same user_name.
  27. GetParentRecord() now supports sys_storage_alias.
  28. AppBuilder() now also creates the script include for the AppSetDefaults() function.
  29. AppBuilder() now checks if an application menu already exists.
  30. AppBuilder() now creates the extention point instance for the DevTools extension point and the corresponding script includes.
  31. Updated example script for the DevTools extension point.
  32. The "List" button now keeps the filter of the list view from which the current record form was navigated.
  33. The "Delete Update Set" button is now active by default.
  34. Sleep() is now accessible to all application scopes.
  35. Renamed function DeleteUpdateSet() to UpdateSetDelete() and made it accessible to all scopes.
  36. The test step config "DevTools - Check scoped app sanity" now checks if active UI actions have a description (a non-empty comments field).

1.25.0 - 2021-10-11

  1. RunScriptInGlobalScope() and the new RunScriptInScope() functions no longer require configuration changes on the sys_script_include table. If DevTools has been installed in the past you may use the following script to revert the modified configuration back to OOTB:
    var grRecord = new GlideRecord('sys_db_object');
    grRecord.addQuery('name','=','sys_script_include');
    grRecord.query();
    if (grRecord.next())
    {
       grRecord.access = '';
       grRecord.read_access = 'true';
       grRecord.create_access = 'false';
       grRecord.update_access = 'false';
       grRecord.delete_access = 'false';
       grRecord.update();
    }
    gs.invalidateCache();
  2. Added function GetTableFromSysId() to identify the table of the record identified by the given sys_id.
  3. Added function ArrayAppend() to append an array to another and make sure return value is always an array.
  4. Added function DatabaseIndexCreate() to add a new database index.
  5. Added function GetParentTable() to return the name of the super class of a given table.
  6. Added function IsValidColumn() to check if a given column exists in a table (or its parent tables).
  7. Added function IsValidFunction() to check if the given value is a callable function.
  8. Added function RecordGetValue() to get a single value from a given record.
  9. RecordSetValue(), GlideRecordUpdate() and RecordBulkProcessor() now support the ghost parameter which (if set to true) uses setWorkflow(false) and autoSysFields(false) to supress business rules, auditing and sys field updates.
  10. RecordBulkProcessor() now effectively detects if the same record is found again and again to prevent an endless loop. If a business rule prevents the update of a record and the ghost mode is not set, the function returns immediately.
  11. Added function TableSetAttribute() to set an attribute of a table to a given value.
  12. Added method InstallerAPI::SetTableAttribute().
  13. Added method InstallerAPI::ActivateBusinessRule().
  14. Added method InstallerAPI::ActivateClientScript().
  15. Added function DeleteUpdateSet() function and the "Delete Update Set" UI action. A system property controls if the button is available to admin users.
  16. The DevTools AppInstall() function now sets the update_synch attribute of the sysauto_script table to true to make sure that scheduled jobs are captured in update sets and committed to source control.
  17. AppInstall() now enables the creation of cross-scope before query business rules by deactivating a business rule and two client scripts.
  18. AppInstall() modifies the UI action "Execute Now" on sysauto to stay on the current form.
  19. The function TestAPI::TestCase() now displays the milliseconds required to run the given function.
  20. Test "DevTools - RunScriptInGlobalScope - Temporary script includes" was flaky due to race conditions during test executions. Added a threshold of 30 minutes so the test will only alert on left over script includes created more than 30 minutes ago.
  21. Test "DevTools - Installation" now checks if the sysauto_script table is configured so that records are captured in update sets and committed to source control.
  22. Test step configuration "DevTools - Check scoped app sanity" now checks for unwanted entries in sys_index associated with the app.
  23. Test step configuration "DevTools - Check scoped app sanity" now checks for test suite tests where the scope of the record does not match the scope of the associated test suite.
  24. Added the business rule "sys_atf_test_suite_test - match scopes" to make sure a test suite test is using the same scope as the associated suite.
  25. GetParentRecord() is now more effectively checking for the suite most relevant to a test by considering the scope of the test_suite, too.
  26. GetParentRecord() now supports records in tables sys_update_xml, sys_update_set, sys_extension_instance, sys_ux_list, sys_ux_list_category, ts_table, sys_documentation (field labels) and sys_dictionary (table columns).
  27. GetRecord() now checks if the given sys_id is valid, hence avoiding unnecessary queries.
  28. GetRecord() now tries to get a record from within the scope instead of using GlideRecordQuery() and hence RunScriptInGlobalScope() in all cases.
  29. GetRecord() now supports a third parameter: bNoCrossScope. If set to true, GetRecord() will not try to load a record from the global scope if it cannot be loaded from DevTools' scope.
  30. IsValidSysId() now confirms that "global" is a valid sys id.
  31. AppBuilder() now also accepts a scope name as the parameter.

1.24.0 - 2021-09-22

  1. DevTools has been tested with Rome Release.
  2. RunScriptInGlobalScope() now supports seven input parameters.
  3. GetParentRecord() now also supports sys_aw_list and sys_aw_list_category.
  4. GetParentRecord() now checks if the GetParentRecord function in the called extension point really exists.
  5. Added function DocumentationAPI::RenderInstallationInstructionsRunTestSuite() to render instructions on how to enable ATF tests and run the app's test suite.
  6. Added function InstallerAPI::DeleteView() to delete views which (due to a platform defect) reappear after installation.
  7. Added a test to verify there are no temporary script includes left over by RunScriptInGlobalScope().

1.23.0 - 2021-09-16

  1. Orlando is no longer actively supported.
  2. GetParentRecord() now supports sys_atf_test_suite, incident_task, change_task, problem_task, sc_task, sc_req_item, sys_db_view_table and sys_db_view_table_field records.
  3. GetParentRecord() now supports tests which are part of multiple test suites if there is exactly one suite in the same scope.
  4. Introduced the DevTools extension point - to extend the GetParentRecord() function.
  5. Added DocumentationAPI::RenderExtensionPoint() function.
  6. AppBuilder() now also adds the AppSetProperty function.
  7. Fixed a defect in test step configuration "DevTools - Check scoped app sanity".
  8. Fixed a defect in AppSanity() when removing the snc_internal role from an ACL.
  9. Removed view "DevTools Install" as it was no longer needed.

1.22.0 - 2021-09-09

  1. When using the "Run Test" button on a test step form, the UI action will first check if there are unsaved changes and save the test step record instead of running the test.
  2. Introduced class TestAPI to support scripted tests by managing log output, result state and various generic test case functions.
  3. Introduced class InstallerAPI to support scripted installation steps (and refactored AppInstall() to use the new class).
  4. Added test step configuration "DevTools - Check test data sanity" to check if there is any test data left over with a given prefix.
  5. TestDataAPI now also supports sc_req_item and sc_task.
  6. Added function AppBuilder() to help building robust scoped apps.
  7. Added function AppBuilderAddTestToSuite() to add an ATF test to an existing ATF test suite.
  8. Added UI action "Add Test" to add a test to a suite in one click.
  9. Added UI action "Up" to navigate to a record's parent record if possible.
  10. The new function GetParentRecord() delivers a record's parent record if supported.
  11. Added function RenderSystemRequirements() to DocumentationAPI to automatically render system requirements including dependencies to other apps.
  12. Added function RenderInstallationInstructionsConfigureTableCrossScopeAccess() to DocumentationAPI.
  13. Added function RenderInstallationInstructionsBackgroundScript() to DocumentationAPI.
  14. Added function RenderUIActions() to DocumentationAPI.
  15. Added function RenderBusinessRules() to DocumentationAPI.
  16. Added function GetInstanceRecordPath(), GetInstanceRecordURL() and GetInstanceRecordURI() to produce different variants of a deep link to a specific record in the instance.
  17. AppSanity() now removes the snc_internal role from ACLs if there is at least one other role required for the ACL.
  18. AppGetName() now returns false instead of "undefined" if the app cannot be found.
  19. The test step config "DevTools - Check scoped app sanity" checks for unintended configuration of the role snc_internal in ACLs.
  20. Added business rule "sys_ui_action - set table to global" to allow global UI Actions. In a recent family release (Quebec?) the option of defining global UI Actions has been removed as the table field no longer allows to set the value to "global". This business rule fixes this issue by setting an empty table field to "global".
  21. RenderValue() now supports the bUnsortedKeys parameter to avoid sorting object keys.
  22. Introduced the function GetAppDependencies() to retrieve information about an app's dependencies to other apps.

1.21.0 - 2021-08-23

  1. Added function GetUserRecord() to get a user's GlideRecord object based on a sys_id, user_name or email.
  2. Added function PerformanceQuery() to measure query performance given a table, query string, a user, the number of repetitions and a limit of records to be returned. The function will provide the milliseconds of the fastest and slowest repetition, the average speed and the number of records returned.
  3. Added function PerformanceQueryMultiple() to execute multiple performance tests on a number of queries combined with a number of users in one go.
  4. TestDataAPI.CreateUser() can now set the user's email.
  5. RecordBulkProcess() now handles empty tables properly and stops immediately.
  6. AppInstall() is now accessible from all scopes. This enables other installation scripts in other scoped Apps to run the function as part of their own installation procedure.
  7. Extended the installation guide to run a background script to configure cross scope access to the sys_script_include table.

1.20.0 - 2021-07-06

  1. AppSanity() now sets is_private to false for system properties.
  2. AppSanity() now deletes useless ACLs for create and delete operations on fields.

1.19.1 - 2021-07-05

  1. TestDataAPI.GetAllUsers() scanned for users where the "name" started with the prefix instead of the "user_name". This has been fixed.
  2. RenderValue() now also sorts the field "user_name" to the top.
  3. ATF tests "DevTools - GetGroupsFromUser", "DevTools - IsUserHasRoleExactly", "DevTools - TestDataAPI - ITSM" and "DevTools - IsUserSecurityAdmin" were checking for the user name ("name") instead of the user id ("user_name") leading to inconsistent results on customized instances. This has been fixed.

1.19.0 - 2021-06-30

  1. Installation has been simplified. Only the sys_script_include table needs to be configured for cross scope access.
  2. Massive refactoring to remove the dependency to the cross scope configuration to various tables.
  3. Added functions GlideRecordDeleteMultiple() and GlideRecordSetValue() to perform said activities from global scope.
  4. Added function DocumentationAPI.RenderInstallationInstructionsAppInstall() to guide an admin to run the AppInstall() function during installation.
  5. Extended DocumentationAPI.RenderInstallationInstructionsImportFromSourceControl() with a new step to create a personal access token.
  6. Install() has been renamed to AppInstall().
  7. IsValidTable() now checks for an empty table name before getting the record.
  8. ATF test "DevTools - GetRolesFromUser" has been refactored into a single script.

1.18.0 - 2021-06-24

  1. Added function TestDataAPI.DeleteAllData() to delete all test data items.
  2. TestDataAPI.GetAllIncidents() now also lists the related task_sla records.
  3. TestDataAPI.CreateDatabaseView() now sets the order and left_join fields correctly.
  4. Added function IsArray() to check if a given value is an array or not.
  5. RenderValue() now displays nested empty arrays and empty objects as a separate row.
  6. RenderValue() now sorts keys of an object in a way that underscores are sorted to the end. This allows to implement a hierarchy using underscores as a prefix to a key name.
  7. RecordSetValue() is now using GlideRecordUpdate() internally making it more resilient against cross scope restrictions.
  8. Added module "Script Execution History" to access previous executions of background scripts.
  9. Refactoring to limit the use of Object.keys() to the GetKeys() function.

1.17.0 - 2021-06-21

  1. Added function GlideRecordDelete() to execute the deleteRecord member function of a GlideRecord in global scope.
  2. Added function SetProperty() to set any property regardless of its scope.
  3. Added function TestDataAPI.CreateDatabaseView() and associated functions to create database views as part of a test.
  4. TestDataAPI.CreateTestItem() did not delete the existing item before creating a new one, this has been fixed.
  5. Fixed the sort order in the "Query Log" module.
  6. The security notice regarding cross scope access configuration is now more prominent at the beginning of the documentation.
  7. The test step configuration "DevTools - Check scoped app sanity" now checks for notification subscriptions that are associated to the scoped app.

1.16.0 - 2021-06-10

  1. Changed the short description to "Code library and tools for ServiceNow developers".
  2. Added functions GlideRecordQuery(), GlideRecordInsert() and GlideRecordUpdate() to call GlideRecord's corresponding member functions in global scope.
  3. Added function IsValidDatabaseView() to check if the given string identifies a database view.
  4. Added function GetDatabaseViewsFromTable() to return all database views which use the given table.
  5. Added function ArrayRemoveValue() to remove a value from an array.
  6. Added function GetInstanceURL() to return the intance root URL.
  7. Added function GetTablesByColumnType() to return all tables which have at least one column of the given type.
  8. Function UserAddRole() is now public.
  9. Function IsValidTable() is now public.
  10. TestDataAPI.GetAllUsers() now also provides the user's roles.
  11. RecordSetValue() can now set values in records across scopes.
  12. Added the missing script macro for RenderBytes.

1.15.0 - 2021-05-05

  1. WARNING: New York is no longer actively supported.
  2. Added function IsTechnicalUser() to check if a given user is a technical user (i.e. web_service_access_only is set to true).
  3. Added function IsProperty() to check if a given system property exists.
  4. Added function AppSetProperty() to set a DevTools system property to a value.
  5. Added function UserImpersonate() which allows to impersonate a user from within a scoped application!
  6. Added function GetRecord() to serve as a shorthand to get a GlideRecord object for a record in a given table, identified by a sys_id.
  7. Added function GetRandomNumericToken() to create a pseudo-random numeric token string of a given length.
  8. Added function UserAddRole() to add a role to a user if the user doesn't have the role already.
  9. RunScriptInGlobalScope() did not work correctly if different scripts were provided within one transaction. It would always execute the first script during a transaction. This has been fixed. Please note that within a provided script, result values must now be set using "result =" instead of "return".
  10. RenderValue() now treats any object that has the sys_id key in the same way as a real GlideRecord object.
  11. GetGroupsFromUser() now checks for an empty user sys id. If an empty sys id was provided and for whatever reasons the sys_user_grmember has records with an empty sys_id, the associated groups would then be returned.
  12. Added view "DevTools" for scheduled jobs to show the "Run as" field.
  13. Renamed internal function SetDefaults() to AppSetDefaults().
  14. The test step configuration "DevTools - Check scoped app sanity" now uses IsTechnicalUser() to check correct configuration of scheduled jobs.

1.14.0 - 2021-04-20

  1. Added function RenderBytes() to return a user friendly number of bytes using KB, MB and GB where appropriate.
  2. Added function RecordDelete() to delete a single record based on a table name and the record sys id.
  3. RecordBulkProcessor() now detects if updating a record fails and aborts the processing. If the update fails, the maintenance date time field cannot be updated and the function would retry the same record until thresholds are reached.
  4. Added test "DevTools - Test data sanity" to check if all test data has been cleaned up in previous test runs.
  5. Added internal function SetDefaults() to set all DevTools system properties to their default values.

1.13.0 - 2021-04-15

  1. Added the StopWatch class which serves exactly as what its name suggests.
  2. Added function GetTimeNow() which is a shorthand for "new Date().getTime()".
  3. Added function GetTransactionRuntime() to return the amount of milliseconds passed since the start of the current transaction.
  4. GetGroupsFromUser() can now return the list of a user's groups with an encoded filter applied to the groups.
  5. Added function BusinessRuleGetOperation() to return the operation (of a business rule) based on the provided record.
  6. Debug() can now display the current transaction runtime in milliseconds. The new property x_snc_devtools.debug.log.transaction_runtime controls if the transaction runtime should be included or not.
  7. RenderValue() has been improved: 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.
  8. The test step configuration "DevTools - Check scoped app sanity" now checks scheduled jobs for only technical users or the system admin serve as the run_as user.
  9. Added module "Query Log" to track invalid queries.
  10. The module "Outbox" is renamed to "Outbox or Sent" and displays sent mails.
  11. Improved column order in module "Storage Column Aliases".

1.12.2 - 2021-03-22

  1. Fixed a defect in IsVersionCompatible().

1.12.1 - 2021-03-22

  1. Fixed a defect in the test step configuration "DevTools - Check scoped app sanity".

1.12.0 - 2021-03-22

  1. RecordBulkProcessor() will no longer process the same record twice in one go.
  2. Test step configuration "DevTools - Check scoped app sanity" now checks for useless field level ACLs.
  3. Test step configuration "DevTools - Check scoped app sanity" now checks for misconfigured test steps.
  4. Test step configuration "DevTools - Check table cross scope access" checks if "Caller access" is set to "Caller Restriction".
  5. Added a comprehensive syntax editor macro for "RecordBulkProcessor" with boilerplate code.

1.11.0 - 2021-03-19

  1. Madrid is no longer supported.
  2. Added function RecordBulkProcessor() to process large amounts of records using a callback function.
  3. Added function Clone() to clone objects. This is to heal the JavaScript inherent design flaw around object references instead of copies.
  4. Added function Merge() to merge two objects.
  5. Added function RecordSetValue() to set a single field value on a given record.
  6. Added function IsObject() to distinguish objects from other types.
  7. Added function IsValidTable() since the TableUtils script include is not accessible from a scoped app.
  8. Added function RenderDateTime() since Javascript has no built-in function to render an ISO date/time string.
  9. Added function Sleep() to do nothing for a set amount of seconds.
  10. RenderValue() now has a second parameter "bHideEmpty". If set to true, empty values in objects are ignored - leading to better readable output.
  11. RenderValue() sorts keys of objects alphabetically. However, the keys "name", "short_description", "number" and "sys_id" will always lead the pack.
  12. RenderValue() now displays empty objects as "{}".
  13. IsEqual() can now compare objects.
  14. TestDataAPI: Added function GetAllData() and corresponding functions for each supported record type GetAllIncidents(), GetAllProblems(), etc.
  15. TestDataAPI: Added function CreateTestItem() and GetAllTestItems() to manage entries in the table x_snc_devtools_test which is used for testing.
  16. ParseDateTime() is now more resilient against incorrect input.
  17. The test step configuration "DevTools - Check scoped app sanity" now checks for empty descriptions in publicly accessible script includes.
  18. Improved installation instructions.

1.10.0 - 2021-02-26

  1. Added function GetAppName() to return the name of a scoped application but without any name postfixes to indicate work in progress. This function is needed to create clean test step configuration descriptions.
  2. Added function AppSanity() which 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.
  3. RenderValue() was improved: In case of objects, the keys are displayed in alphabetical order. In case of arrays, the elements are displayed in the given order as before.
  4. Added function DocumentationAPI::RenderListItem() and refactored all Render*() functions.
  5. The test step configuration "DevTools - Check scoped app sanity" now checks for jelly breakpoints in UI pages.
  6. Added configuration options section to the documentation.
  7. Removed unnecessary debug logging in TestDataAPI.

1.9.0 - 2021-02-15

  1. Quebec is now supported.
  2. Added function GetRolesFromUser() to get the sys_ids of all active roles of a user.
  3. Added function TestDataAPI::CreateRole() to create a role for testing purposes.
  4. TestDataAPI::CreateUser() now also accepts the name of a role without the prefix.
  5. Added function DocumentationAPI::RenderInstallationInstructionsImportFromSourceControl() to render installation instructions for importing an application from source control.
  6. Added function DocumentationAPI::RenderDisclaimer().
  7. Improved the rendering of script include documentation in DocumentationAPI::RenderScriptIncludes().
  8. Added missing description to the DocumentationAPI script include.
  9. Test step configuration "DevTools - Check scoped app sanity" now checks if the app's short_description is empty.
  10. Test step configuration "DevTools - Check scoped app sanity" now checks if a module's link_type is set to "HTML" (which doesn't work properly).

1.8.0 - 2021-01-21

  1. Added the DocumentationAPI class to render HTML fragments for a documentation UI page.

1.7.0 - 2021-01-20

  1. Added function IsValidVersion() to check for a valid (ServiceNow app) version string.
  2. Added function IsVersionCompatible() to check a version against a requirement.
  3. Added test step configuration "DevTools - Check scoped app dependency". This test step configuration checks if another required scoped application is installed in a (backward) compatible version.
  4. Added module "Background Script" to open the background script page in a new window.
  5. Added new navigation section "Transaction" and moved all transaction related modules into it.
  6. Added new navigation section "Cache" for easy access to the cache inspection tool and to flush the cache.
  7. Added new navigation section "Events" to easily access the event log, event registry, notifications, and outbox.
  8. Added more test cases for GetIntegerValue().

1.6.0 - 2021-01-14

  1. Added function IsTableCrossScopeAccessible() to check if applications from other scopes can perform read, create, update and delete operations on the given table.
  2. Added function RunScriptInGlobalScope() to run a script in the global scope from within a scoped application. Note that the function required full cross scope access to the sys_script_include table.
  3. IsEqual() now uses type strict comparison and will no longer return true in case of IsEqual(1,"1").
  4. The "Rerun Test" button has been renamed to "Run Test" and is now available on all forms that directly refer to an ATF test (including test steps).
  5. The ATF tests "TestDataAPI" and "GetGroupsFromUser" now make use of the "DevTools - IsTableCrossScopeAccessible" test step configuration to check if the cross scope access to the tables is configured.
  6. The ATF test "Installation" now checks if the system property glide.record.legacy_cross_scope_access_policy_in_script is set to true to avoid cross scope access policy errors. Refer to KB0711970.

1.5.0 - 2020-11-23

  1. Added test step configuration "DevTools - Check scoped app sanity". This test step configuration takes a scoped application and checks if all its sys_properties are NOT set to private, and all ATF tests have an empty copied_from field. More checks will be added later.
  2. Added test step configuration "DevTools - Check table cross scope access"
  3. Added test step configurations to the documentation.
  4. Added test "DevTools - Installation" to check if all relevant tables are configured according to the installation guide.
  5. Added test "DevTools - App Sanity" to check if the app sanity is ok.
  6. Added table sys_user to the list of tables which need full cross scope access.

1.4.0 - 2020-11-16

  1. Added function IsUserSecurityAdmin().

1.3.0 - 2020-11-04

  1. Added class TransactionCacheAPI.
  2. Added function HtmlEncode().
  3. Added function GetKeys().
  4. Added function StringRemoveCharacters().
  5. Part of the documentation is generated automatically based on record descriptions.

1.2.4 - 2020-09-10

  1. ParseDateTime() has been repaired, aligned to UTC and the corresponding test has been implemented.
  2. LoadMessages() now takes the language as the second parameter. Defaults to 'en'.
  3. GetBoolValue() was not accessible out of scope. This has been fixed.
  4. IsValidRecord() now also checks for type ScopedGlideRecord and ScopedGlideRecordSecure. The ATF test has been updated accordingly.
  5. TestDataAPI functions now display the sys_ids of created records in the log.
  6. Added the "Cancel Transactions" module.
  7. Added test and macro for IsUserHasRoleExactly().
  8. Added the system property x_snc_devtools.ui.list_button to control if the "List" button should be visible or not.
  9. Extended documentation with a reference to all script includes.

1.2.3 - 2020-08-21

  1. Added the "Transaction Log" module.
  2. "Evaluator Log", "Debug Log" and "App Log" modules only show the last 30 minutes.
  3. Added the "Storage Column Aliases" module.
  4. RenderValue() can now work properly with nested objects.

1.2.2 - 2020-08-02

  1. RenderValue() no longer causes the following error: com.glide.script.fencing.MethodNotAllowedException: Function getValue is not allowed in scope x_snc_devtools.

1.2.1 - 2020-07-30

  1. GetArrayValue() now returns an empty array for an empty string.

1.2.0 - 2020-07-07

  1. Added TestDataAPI.CreateRequest() and extended the ATF test "DevTools - TestDataAPI"
  2. Refactoring of several functions in TestDataAPI. Caller and Opener users can now be set explicitly.
  3. Added function IsValidRecord()

1.1.0 - 2020-07-03

  1. Added TestDataAPI.CreateProblem() and TestDataAPI.CreateProblemTask()
  2. The install script is now a scheduled script that can be run on demand instead of a fix script that runs automatically.

1.0.0 - 2020-06-23

First baselined version