Reference field value not visible in form and showing 'No preview available' when clicked on info icon

Preethiga1
Tera Contributor

Hi,

Assignment group field is updated in background script (PFB) , but value is not displaying in form as well as in list view. But if I tried to update assigned to field using similar script(d.assigned_to='XXXX') it works fine. I can use setDisplayValue() in below script to make it work for group, but I just need to know why assigned to filed got updated correctly and not group field? what is the difference between these fields referencing to user/group table? Note: Even I checked both dictionary override fields, there is no much difference. Also, no field in user/group table is marked as display true and value we are trying to update in group field is available in instance.

find_real_file.png

find_real_file.png

Background Script Used:

var d= new GlideRecord('incident');
d.addEncodedQuery('numberSTARTSWITHXXXXXXXXXX');
d.query();
gs.print(d.getRowCount());
if(d.next()){
d.assignment_group='cross platform';
d.update();
}

18 REPLIES 18

I tried in below 2 ways to update assigned to field (gr.assigned_to='XXXX') and it worked , 

--> XXXX as 'userID of user record'

--> XXXX as 'name of user record'

Note: I didn't use XXXX as sys_id. 

 

It works when the reference table is user table.

But not for other tables.

yeah exactly this works only for fields referencing to user table.

So, this is OOB feature in service now ?

Yeah, just figured out.

--> XXXX as 'userID of user record' - will work fine as it is always uniques

--> XXXX as 'name of user record' - will work fine only if no duplicate names present in the user table

 

 

Regards,
Mahesh Kumar

Thanks Mahesh for your timely response. Appreciate it!!!! If you come to know more information about 'what is making user reference field to update in this method', Kindly share it here.