jjones4773
Tera Guru

I'm trying to do the reverse of this and did this script. It worked once, but that was it.

(function executeRule(current, previous /*null when async*/) {

    // Add your code here
    
    var gr=new GlideRecord('sys_user');
gr.addNullQuery('photo');
gr.addQuery('sys_id', current.getValue('document'));
gr.query();
while(gr.next())
{
gr.setValue('photo', current.getValue('photo'));
    //gr.photo=current.photo();
gr.update();
}


})(current, previous);