How to delete a record from a reference table without deleting related records

MRAdmin
Tera Contributor

I am looking to clean up a reference table. The table holds records of employee names and gives access to the Service Catalog to submit requested items. There are employees listed in it that are no longer with the company that I'd like to delete. I am looking for the ability to delete these records but still have the names show up in the caller and affected user fields in incidents. I located the doc regarding Reference cascade rule (Advanced view) and you are supposed to be able to edit the rule and choose None in the Default field. This is the doc:

https://docs.servicenow.com/bundle/paris-platform-administration/page/administer/data-dictionary-tables/reference/r_DictionaryEntryForm.html

I right clicked on the caller label in an incident and chose configure dictionary, then went to configure form design. 

Here is a screenshot of where the properties can be changed:

find_real_file.png

 

The employee's name was still removed from the field. I am thinking I am missing a step somewhere. Does anyone have any advice?

11 REPLIES 11

Jim Coyne
Kilo Patron

Is it the User (sys_user) table or a custom one?

It is a custom table but uses the sys_user records. 

To be clear, you CAN delete records in ServiceNow, it's just that, depending on the data, you probably SHOULDN'T, in order to keep historical data AND to do exactly what you are looking to do.

That is why most tables contain an "Active" field.  Case in point, the User table.  By default, the Active field is checked so that the User record can be selected as the Caller, for instance, in the Incident table.  When the person leaves the company, the Active field is unchecked.  This has the effect of the record no longer being selectable in a Reference field, BUT, is still displayed on older records, which seems to be what you are looking for.

I don't know how that custom table is setup, but it sounds like it may not have been thought out very clearly.  And it actually sounds like you are deleting the User record itself and not the entry in the custom table.  Deleting an entry in the custom table should not clear the Caller field in the Incident table unless it is pointing to that table as well, which I hope it is not.

Can you add some screenshots of the table and what you are trying to do?  You should be able to clear out/pixelate any personal/company info. My initial thought is you are clicking on the person's name (#1 in screenshot below) in a list view which opens up the User record, when in fact you should be clicking on the "i" icon (#2 below) which would open up the custom table record which should then be safe to delete:

 

find_real_file.png

It is a custom table that is referencing the sys_user table. The table holds a list of employees that allows for their names to be used in a dropdown in one of our forms.