Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

ScopedDCManager- Scoped

The ScopedDCManager API enables you to group data by type.

Using this API you can:

  • Assign data classifications to existing dictionary entries.
  • Look up the data classifications for specific dictionary entries.
  • Remove all data classifications associated with specific dictionary entries.
  • Retrieve a list of all data classifications available in the current domain.

This API requires the Data Classification [com.glide.data_classification] plugin.

For more information, see Data Classification.

Parent Topic:Server API reference

ScopedDCManager - classify(String dictEntries, String dataClasses)

Assigns pre-defined or user-defined data classifications to existing dictionary entries.

Requires the admin or data_classification_admin role.

NameTypeDescription
dictEntriesStringSys\_ids of the records you want to classify. Entered as a comma-separated list enclosed in a string. Table: Dictionary \[sys\_dictionary\] table
dataClassesStringSys\_ids of the data classifications you want to assign. Entered as a comma-separated list enclosed in a string. Table: Data Classification \[data\_classification\]
TypeDescription
StringMessage describing the result of the operation.

This example finds records containing social security numbers and classifies the records as confidential.

var dcm = new global.ScopedDCManager();
var confidentialClass = {};
var ssnFields = [];
var dataClasses = JSON.parse(dcm.getAllDataClasses());

// Get the Confidential data class record
dataClasses.forEach(function (dataClass) {
  if (dataClass.name == "Confidential")
    confidentialClass = dataClass;
});

// Find the fields that seem to be strong social security numbers
var dictionaryGR = new GlideRecord("sys_dictionary");
dictionaryGR.addQuery("element", "ssn").addOrCondition("element", "social_security_number");
dictionaryGR.query();
while (dictionaryGR.next())
  ssnFields.push(dictionaryGR.getUniqueValue());

// Classify any found entries as confidential
if (ssnFields.length > 0)
  dcm.classify(ssnFields.join(), confidentialClass.sys_id);

Output:

"Successfully stored the data classification configurations"

ScopedDCManager - clearClassification(String dictEntries)

Removes all data classifications for the specified dictionary entries.

Requires the admin or data_classification_admin role.

NameTypeDescription
dictEntriesStringSys\_ids of the records you want to remove classifications from. Entered as a comma-separated list enclosed in a string. Table: Dictionary \[sys\_dictionary\]
TypeDescription
StringMessage describing the result of the operation.

This example removes the data classification for a dictionary entry.

var dcm = new global.ScopedDCManager();
gs.info(dcm.clearClassification("445de0a6dba30300efc57416bf9619b0"));

Output:

"Classifications removed for the specified dictionary entries"

ScopedDCManager - getAllDataClasses()

Returns a list of all data classifications available in the current domain.

Requires the admin, data_classification_admin, or data_classification_auditor role.

NameTypeDescription
None  
TypeDescription
<Array>Result of the request. Returns the sys\_id and name for each available data classification. If there are no data classifications, it returns an empty array. Data classifications can be organized into parent-child relationships. If there are parent data classifications, they are identified in the result. Data type: Array ``` [ { "parent": {Object}, "sys_id": "String", "name": "String" } ]
</td></tr><tr><td>

&lt;Array&gt;.parent

</td><td>

Entry for a parent data classification.Data type: Object

 ```
"parent": {
  "sys_id": "String",
  "name": "String"
}
<Array>.parent.sys\_idSys\_id of the parent data classification from the Data Classification \[data\_classification\] table.Data type: String
<Array>.parent.nameName of the parent data classification.Data type: String
<Array>.sys\_idSys\_id of the data classification from the Data Classification \[data\_classification\] table.Data type: String
<Array>.nameName of the data classification.Data type: String

This example retrieves a list of all available data classifications.

var dcm = new global.ScopedDCManager();
gs.info(dcm.getAllDataClasses());

Output:

[
  {
    "parent": {
      "sys_id": "a9670fc773fc1010ae8dd21efaf6a735",
      "name": "Confidential"
    },
    "sys_id": "348107b951d71010f877f3f178e7dd0d",
    "name": "Personally identifiable information"
  },
  {
    "sys_id": "a9670fc773fc1010ae8dd21efaf6a735",
    "name": "Confidential"
  },
  {
    "sys_id": "59b7070b73fc1010ae8dd21efaf6a764",
    "name": "Restricted"
  },
  {
    "sys_id": "11d60fc773fc1010ae8dd21efaf6a744",
    "name": "Internal"
  },
  {
    "sys_id": "f5b4cf4773fc1010ae8dd21efaf6a766",
    "name": "Public"
  }
]

ScopedDCManager - getClassification(String dictEntries)

Retrieves all data classifications for the specified dictionary entries.

Requires the admin, data_classification_admin, or data_classification_auditor role.

NameTypeDescription
dictEntriesStringSys\_ids of the records you want to retrieve classifications for. Entered as a comma-separated list enclosed in a string. Table: Dictionary \[sys\_dictionary\]

This example retrieves the data classifications for a dictionary entry.

var dcm = new global.ScopedDCManager();
gs.info(dcm.getClassification("445de0a6dba30300efc57416bf9619b0"));

Output:

{
  "445de0a6dba30300efc57416bf9619b0": [
    {
      "parent": {
        "sys_id": "a9670fc773fc1010ae8dd21efaf6a735",
        "name": "Confidential"
      },
      "sys_id": "348107b951d71010f877f3f178e7dd0d",
      "name": "Personally identifiable information"
    }
  ]
}

sndocs is an independent community mirror and is not affiliated with or endorsed by ServiceNow.

ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the United States and/or other countries. Other company and product names may be trademarks of the respective companies with which they are associated.

© 2026 ServiceNow, Inc. All rights reserved.

Documentation content is redistributed under the Apache License 2.0 from the ServiceNowDocs repository.

TypeDescription
<Object>JSON object containing each dictionary entry's sys\_id with an array of its associated data classes. If there are no associated data classifications, it returns a message describing the result of the operation. Data classifications can be organized into parent-child relationships. If there are parent data classifications, they are identified in the result. Data type: Object ``` { : [ { "parent": {Object}, "sys_id": "String", "name": "String" } ] }
</td></tr><tr><td>

&lt;Object&gt;.parent

</td><td>

Entry for a parent data classification.Data type: Object

 ```
"parent": {
  "sys_id": "String",
  "name": "String"
}
<Object>.parent.sys\_idSys\_id of the parent data classification from the Data Classification \[data\_classification\] table.Data type: String
<Object>.parent.nameName of the parent data classification.Data type: String
<Object>.sys\_idSys\_id of the data classification from the Data Classification \[data\_classification\] table.Data type: String
<Object>.nameName of the data classification.Data type: String