Custom license metric example script

reference australia Updated Sep 10, 2026 1 min read custom-license-example-script.md
Raw file servicenow.com

The following is an example of a custom license metric script.

Note: This example is for demo purposes only and is not meant to be used for actual compliance scenarios.

XML
<script><![CDATA[getRightsForDevice();function getRightsForDevice(){var rightsForDevice = -1;	var deviceRecord = new GlideRecord('cmdb_ci_computer');	if(deviceRecord.get(entity)){		rightsForDevice = deviceRecord.getValue('disk_space');	}	return rightsForDevice;}]]></script>

Parent Topic:Add a custom license metric

Search documentation
Search document titles and file paths on the australia branch