The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Ci Name and Serial Number

ND7
Kilo Sage

Dear Experts, 

 

we are facing an issue with duplication, The reason the serial number is not populating with ci, even though the script on assetandci has 

 

if (ciClass != '') {
var ciSysId;
var ci = new GlideRecord(ciClass);
ci.initialize();
ci.asset = asset.sys_id;
// in the absence of a calculated name for CIs, set
// something so links don't appear blank
ci.name = asset.model.name;
// Populate manufacturer
ci.manufacturer = asset.model.manufacturer;
// inherit values from asset for shared fields
var sync = new AssetAndCISynchronizer();
sync.syncRecordsWithoutUpdate(asset, ci, 'cmdb_ci', false);
// insert CI record and stick its reference in the asset
var assetCMDBUtil = new AssetCMDBUtil();
if (asset.install_status != 2
&& !gs.nil(asset.serial_number)
&& assetCMDBUtil.isSerialNumberMandatory(asset.model_category)) {
ci.name = asset.serial_number + ' - ' + asset.model.name;
ciSysId = assetCMDBUtil.createCIUsingIRE(ci);
} else {
ciSysId = ci.insert();
}
asset.ci = ciSysId;
}
},

 

not showing serial number#

ND7_1-1706631481117.png

 

 

 

I am looking to fix it like this

ND7_3-1706631761601.png

 

APPRECIATE YOUR HELP! 

 

1 REPLY 1

Kumar Premankit
Tera Expert

I need more info than this script to suggest a few things. Please note Serial numbers are the key to building relationships especially for computers as the IRE rule identifies uniqueness from it. 

 

refer the following URL specially the section about  glide.asset.create_ci_with_ire

https://docs.servicenow.com/bundle/tokyo-it-service-management/page/product/asset-management/concept...