Assets from CIs : Display Name is blank on produced Asset Record

Chris Roser
Giga Contributor

I recently setup a Model Category for a CI Class that's being imported via an integration. While assets are now successfully being created automatically, they lack any information linking them back to the original CI they were created to mirror. Is there a Business Rule that I need to add to so the information passes correctly? Right now when the Asset is created from the CI record automatically, it simply puts 'Unknown' as the Display Name. This is the primary piece I need to know, the other fields are not high importance but the Display Name needs to be the name of the CI.

1 ACCEPTED SOLUTION

Chris Roser
Giga Contributor

Found the solution on this: An edit is needed to the AssetUtils Script so that when an Asset is added it creates the Display Name from the CI

calculateDisplayName : function(asset) {
var display_name = "";
if (asset.asset_tag)
display_name += asset.asset_tag + " - ";
if (asset.model)
//display_name += asset.model.display_name; Instead of this we use below line

display_name += asset.ci.name;

if (asset.display_name == display_name)
return false;

asset.display_name = display_name.trim();
return true;
},

View solution in original post

1 REPLY 1

Chris Roser
Giga Contributor

Found the solution on this: An edit is needed to the AssetUtils Script so that when an Asset is added it creates the Display Name from the CI

calculateDisplayName : function(asset) {
var display_name = "";
if (asset.asset_tag)
display_name += asset.asset_tag + " - ";
if (asset.model)
//display_name += asset.model.display_name; Instead of this we use below line

display_name += asset.ci.name;

if (asset.display_name == display_name)
return false;

asset.display_name = display_name.trim();
return true;
},