sys_id is a 32 character unique GUID(Globally Unique ID)
This means your catalog item have a 32 character unique sys_id as well.
There are few ways to find the sys_id of a record. In this blog post I will explain you my favorite 2 methods
Users can locate the sys_id of a record using the header bar.
- Navigate to the record.
- Right click the header bar and select Copy URL.
The sys_id is inside of the URL, after the parameter sys_id=. For example, the following is a URL for a catalog Item:
https://<instance name>.service-now.com/sp?id=sc_cat_item&sys_id=D10a2f5dfc6112276018db58138c7a1e0
sys_id here is D10a2f5dfc6112276018db58138c7a1e0
Test in a development instance first!
-
Login as an admin
-
Go to System Definition > Scripts – Background
-
Paste a script similar to this and click Run Script
var grCAT = new GlideRecord(‘sc_cat_item’);
grCAT.query();
while (grCAT.next()){
gs.print(‘CI Name: ‘+grCAT.getValue(‘name’)+ ‘, Sys ID: ‘ +grCAT.getValue(‘sys_id’));
}
Note: Above script will list catalog items name and sys_ID like in the screenshot below.
Share