- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2024 02:58 AM
Hello All,
I have a scenario where the one of the VM model has been wrongly set to 'create asset records' during asset and CI creation which ended up creating both assets and CI. But in this case, we are supposed to have only CI records and not asset records as they are not physical assets. I have corrected the model to stop creating assets. and also i'm trying to delete the asset record which is also deleting the CI record which is not supposed to happen.
Any idea how to safely remove the asset and CI relationship and then delete only asset record?
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2024 01:41 AM
Hello All, Thank you for the response.
I found a better way without script in this link Solved: Delete Asset Record without deleting the CI - ServiceNow Community.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2024 03:40 AM
Hi @Allen_Deepak ,
Maintain the integrity of the CMDB by deleting any CI relationships that are no longer relevant or needed for a CI. Use the relationship editor to delete CI relationships.
Before you begin
Role required: ITIL or asset
Procedure
- Launch the relationship editor:
- Open the CI form of the CI for which you want to delete a relationship.
- Locate the Related Items section near the center of the form.
- Click the plus (+) icon on the Related items section.
- In the Relationship Editor, in the Relationships section, select the relationships that you want to delete for the CI.
- Click the Delete selected relationships icon.
- Click Save or Save and Exit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2024 04:42 AM
Hi @Community Alums Thank you for the response.
The relationship editor doesn't show up the CI to asset relationship.
but yes, we can add and remove other CI dependent relationships like VMIs, related servers, clusters, etc,..
That doesn't work for asset to CI relationship? Any other way to manually remove them without scripting?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2024 09:20 AM
delete them using background script with setWorkflow(false)
or
unlink the assets first and them delete them
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2024 09:36 AM
Steps:
1. On the Asset records, clear the CI field and save
2. On the CI records, clear the Asset field and save
3. Delete the asset records