Asset-CI :How to avoid the assets for the virtual models

swathi8
Kilo Contributor

Hello All,

As per OOB, When CI with Physical model with tracking strategy as 'Leave to Category' is created, an asset is created.

When the same CI is updated with a model(Virtual) with asset tracking strategy 'Do not create assets', the old asset is being updated. 

Please suggest with the better solution to avoid the assets being updated for the virtual models.

Thanks in Advance!

Regards,

Swathi Marri

1 REPLY 1

CMDB Whisperer
Mega Sage
Mega Sage

Once you create an asset and link it to a CI, changing the asset tracking strategy will have no effect.  Asset tracking strategy only affects what happens on Insert, not on Update.  If you have already created assets for that model, you will need to remove them, but you cannot use Delete to do this, or you will delete the CI as well.  There is a Delete Asset Only action available from the Asset form to do just that.  You can also get to this function using a scripted approach.  The code for the UI action shows how:

var a = new AssetandCI();
a.deleteAssetOnly(current);

You'll just need to do a search for any assets whose Model has an asset tracking strategy of Do Not Create Assets, and then call deleteAssetOnly() for those assets.


The opinions expressed here are the opinions of the author, and are not endorsed by ServiceNow or any other employer, company, or entity.