How to set a reference field to null?

mitzaka
Mega Guru

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?

5 REPLIES 5

mitzaka
Mega Guru

Hm, I think I found where my first issue is - the workflow behind change assigns new changes to a specific group, this is why it's always populated after a clone. I will try to modify the workflow and then i will try your suggestions guys. Thanks!