
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2017 11:15 PM
Hello Experts,
When i am trying to create a new asset by going to Asset -> All assets -> New -> Hardware
I fill all the mandatory fields along with the field Asset tag.
After submitting the form the Configuration Item is filled with the same name as the Asset tag.
This is happening with the Fuji Release but not in the Istanbul release.
In Fuji :
In Istanbul
Any suggestions on this ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2017 08:54 PM
At least with Helsinki, the logic is to create a new CI if one does not exist for the asset, which can lead to duplicate CIs.
This is the createCI function in the AssetandCI Script Include:
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
asset.ci = ci.insert();
When it creates the CI, the display name will be the asset model name. You can either change this script to set the CI name to asset.asset_tag or set the display field for CI to asset_tag which will apply to every form.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2017 10:59 PM
Hello Andrew,
Thanks for the help. Could you please let me know what if some one updates the asset tag.
In this case the CI should also be updated accordingly but this is not working.
I tried creating a BR on asset table but the value is not getting updated.
Could you please help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-13-2017 07:43 AM
The Asset CI Mapping table and Script Include AssetAndCISynchronizer does the magic behind the scenes. Unfortunately, you cannot add a field twice to the mapping table.
What should happen if someone updates the name field on the CI record? How did you construct your BR?
If you create the CI first, the asset is named "asset tag - model id", and when you update the asset tag on the CI record, the asset name is updated too.
Are you populating CIs through a discovery tool integration?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2017 08:57 PM
Hello Guys,
Thanks for your response i found the solution.
There is script Include AssetandCI
there i added the code in the function createCI
if(!asset.asset_tag.nil()){
ci.name = asset.asset_tag;
} else{
ci.name = asset.model.name;
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2017 11:07 AM
Thank you so much for this! I've been trying to find out where this script was and couldn't find it for a long time. Thank you again...very helpful!