---
sourceDocument: Australia Asset Management
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/it-asset-management

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia Asset Management

ft:clusterId :

    - itam

bundleId :

    - itam

workflow :

    - Technology


---

# Custom license metric example script

# Custom license metric example script {#ariaid-title1}

* Release version: Australia
* 
* Updated March 12, 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

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.

    <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>


