Computer CI name needs to be set to Serial Number

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2022 09:11 PM
When we create an asset with model category of Computer, system automatically creates a Computer CI. This CI has Name value set to the asset's model's name.
Can we set it to asset Serial Number instead?
Will there be problems if we do it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2022 03:30 AM
Try this BR on-before insert
Table:- alm_asset or whatever your table is
Action:- configuration item.serial number same as serial number
Issue:- If the CI gets discovered in future, the name will automatically change via discovery hostname.
If its helpful ,please mark my answer as correct
Anshu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2022 04:00 AM
Hi,
There are OOB business rules which keep sync between cmdb_ci and asset table. Please check this out
1)Create asset on model change
2)Create Asset on insert
3)Update Asset fields on change
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2022 06:47 AM
Alternate suggestion to consider -- By default the CI name is actually set to a concatenation of asset tag and model display name. The reason you are seeing it as just model name is because you don't have an asset tag. Rather than modify the out of box behavior here, it would be best to supply an asset tag value on the asset, which will give you a unique name for your CI. If you don't have an asset tag and don't plan on having one, then you can use the serial number as an asset tag by creating a business rule to sync the serial number value to the asset tag if there isn't another value provided. That way your CI name will be unique, and it will contain the serial number, without having to modify the existing out of box business rules.
The opinions expressed here are the opinions of the author, and are not endorsed by ServiceNow or any other employer, company, or entity.