- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2016 09:03 AM
Hello,
This is my first training on the ServiceNow, so i want to delete all the record from location table and import new record, but i can't delete all the record because of this message:
"Delete of 615 North Bush Street, Santa Ana,CA not allowed because of a reference in record Southern California Warehouse within the Stockroom file"
each record has a parent record on the same table, and this parent record has a parent record on the same table...etc
so it's impossible to delete 17 records.
Have u any help ? by using manuel delete, by script or other ?
Thanks for your help
Regards
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2016 09:09 AM
In a hierarchical configuration, you need to delete all the records the "end" records that have no children first. Once you have those, then you do it again and again until you reach the top of the tree structure. It's an iterative process in this case where you have parent records. Otherwise you could end up with a big mess with children referencing parents that aren't there.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2016 09:09 AM
In a hierarchical configuration, you need to delete all the records the "end" records that have no children first. Once you have those, then you do it again and again until you reach the top of the tree structure. It's an iterative process in this case where you have parent records. Otherwise you could end up with a big mess with children referencing parents that aren't there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2016 04:37 AM
It's OK but is a big work...to delete one by one
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2016 05:41 AM
Thanks for the feedback Jaouad.
You should be able to delete "level by level" for those records that have no children. A bit like cutting down a tree. Just lop off the branches that have no sub branches and eventually you get to the trunk.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2018 05:26 AM