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

MRAdmin
Tera Contributor

You are correct in that this table is referencing the user table. It is for a question in one of our forms. The employee gets added to this table, which then allows the name to be added to the dropdown. I wanted to be able to clean the table up and remove old employees. I would send a screenshot, but it's just a list of employees. It sounds like it will be hard to delete from this table since it is linked to the user table. The user still shows up in this table if their profile is inactive. 

Brian Lancaster
Tera Sage

I think cascade delete stopes record that are related to the record you are deleting from being deleted.  For example if you disable cascade on the user table it would stop records like Notification devices and notification messages from being deleted.  But if you did a lookup on these table the record would be there but the user info would either be blank or have a sys_id.

I suppose I'm looking for the opposite. I am would like the record to be deleted but the user info to remain so that the field isn't blank and I don't just see a sys_id. When I was testing, the sys_id appeared in the watch list for the record that was deleted instead of the name of the employee that corresponded with the email address, and the caller field is now empty. I would like both to remain intact. 

I don't think that is possible.  If you delete the record a field is pointing to the pointer is not broken.  Perhaps using data archiving might work.

Yes, I have been told you cannot delete records in ServiceNow. Do you know what the Reference Cascade rule is for then? I am confused as the description makes it sound like it's what I'm trying to accomplish:

 

find_real_file.png