Creation of catalog to delete relationship records from cmdb_rel_ci table in servicenow

PS28
Tera Contributor

I want to create a catalog to delete the relationships from cmdb_rel_ci table with the approval of CI Owner

Want to have some inputs in catalog design on what all catalog variables should be added to select the relationship records with the help of parent, child and type fields to delete multiple CIs in one go from cmdb_rel_ci table.

3 REPLIES 3

Mark Manders
Mega Patron

Since the table only has 3 fields that matter, it should be those three plus the reason for relationship deletion.

If you hang a flow behind it to automate the deletion after approval, you're done. 

You do need to see how well your CMDB is configured. It may be too much to ask for the relationship, because not everyone understands it. If it's for use cases like applications no longer running on a server, the relationship type doesn't matter, the requestor can just say: I want to delete the relationship between the application and the server.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Satishkumar B
Giga Sage
Giga Sage

Hi @PS28 

catalog item to delete relationship records from the cmdb_rel_ci table involves designing the catalog item to capture the necessary information and implementing the logic to perform the deletion with CI Owner approval.

  • Create a new catalog item under Service Catalog > Catalog Definitions > Maintain Items with necessary details for deleting CI relationships.
  • Add variables for selecting the parent and child CIs, relationship type, and CI Owner approval requirement.
  • Develop a script include, to define the logic for deleting relationship records from the cmdb_rel_ci table.
  • Use Flow Designer or Workflow Editor to configure an approval process requiring CI Owner consent before deletions proceed.
  • Implement a script in the catalog item that calls the script include to perform deletions after approval.

…………………………………………………………………………………………………….

HAPPY LEARNING

Please Mark it helpful 👍 and Accept Solution ✔️ !! If this helps you!!

PS28
Tera Contributor

@Satishkumar B 

 

Thx for your response, possible to explain more on that will be helpful:

  • Add variables for selecting the parent and child CIs, relationship type, and CI Owner approval requirement.
  • Develop a script include, to define the logic for deleting relationship records from the cmdb_rel_ci table.

Thx