How to set a reference field to null?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2014 01:25 AM
Hi SNC,
What is the way to set reference fields to null (make them empty)?
I have an UI Action which clones a change and for the clone I am trying to empty the assigned_group field. My script goes like this:
var change = new GlideRecord("change_request");
change.short_description = current.short_description;
change.description = current.description;
change.cmdb_ci = current.cmdb_ci;
..................
...........
and so on, but this approach (change.assigned_group = null;) does not work for the reference field.
Any ideas?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2014 01:29 AM
not even 'NULL' ? try that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2014 01:33 AM
Nope, tried that, doesn't work.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2014 01:55 AM
HI,
Can you please try with the below one
change.assigned_group = "";
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2014 02:01 AM
It is on the wiki http://wiki.servicenow.com/index.php?title=Resetting_Reference_Fields