- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2016 07:36 PM
Hi all,
I'm using a reference field to the user table for a 'name'. I need to fix the value so if an object in AD is deleted, the username value in the reference field is not removed. Anyone know how to achieve this?
Thanks all!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2016 10:59 PM
Hi Jim,
Arnab's answer will almost get you there... but not quite.
You can change the cascade rule to "None" (note this is not the same as "--None--"), however this will only maintain the value of the sys_id after the referenced record gets deleted. To store the value of the name field instead, set it (name) as the Reference Key for your reference field in addition to changing the cascade rule.
The thing you have to be aware of is that if you have any duplicate values stored in the 'name' field, this could cause it to point to an incorrect record. However if your usernames are required to be unique, this shouldn't be a problem.
Give that a try,
-Brian

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2016 08:36 PM
Hi Jim,
Please refer section 7 "Cascade Delete Rules" for more info.
Reference Fields - ServiceNow Wiki
Please let me know if you have any questions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2016 10:22 PM
Hi Jim,
You can do this to restrict the deletion of a value in reference field when the user is deleted from AD :
Right click on the reference field >> Click on Configure Dictionary >> Find the section "Reference Specification - Additional Customization" (if you can't locate it, click on advanced view) >> you will get a drop down field "Reference cascade rule" >> Select the option "None" inside the drop down box (note that by default you might be seeing the "--None--" option but this not the "None" I'm talking about. Inside the drop down you'll get another "None" option. Select this) >> Save/Update. See the screen shot below :
Thanks,
Arnab
Please mark Helpful/Correct if my solution was of any worth to you !

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2016 10:59 PM
Hi Jim,
Arnab's answer will almost get you there... but not quite.
You can change the cascade rule to "None" (note this is not the same as "--None--"), however this will only maintain the value of the sys_id after the referenced record gets deleted. To store the value of the name field instead, set it (name) as the Reference Key for your reference field in addition to changing the cascade rule.
The thing you have to be aware of is that if you have any duplicate values stored in the 'name' field, this could cause it to point to an incorrect record. However if your usernames are required to be unique, this shouldn't be a problem.
Give that a try,
-Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2016 11:12 PM
Thanks for the light Brian. Appreciate your help !