The CreatorCon Call for Content is officially open! Get started here.

Creating a Dialog Window to emulate Reference Field Lookup Window

alijubran
Kilo Expert

I am working on a script that will pop up a window and allow the user to select an Assignment Group when the Assigned To user is selected and Assignment Group is empty. The popup window will display only groups that the Assigned To user is a member of.

I am able to get all of that working, but i am using the following in my onChange client script.

setTimeout(function(){$('lookup.incident.assignment_group').click()}, 500);

This essentially forces a mouse click on the Assignment Group lookup button and by using the backfill assignment   (Reference Qualifiers - ServiceNow Wiki ) ref qualifier , only groups that the user is a member of displays....

My inquiry is to see if anyone can suggest a better way of displaying the available groups in a popup and allow the user to select from the Assigned To User's groups. It currently pops the window up in the top left hand corner and still shows the + buttons in the group hierarchy to expand and show users. Ideally I would only want the Group name.

I was thinking Dialog Window but haven seen a way to create a clickable ref list.

1 ACCEPTED SOLUTION

bernyalvarado
Mega Sage

Hi Ali,



One option that you have is to use a GlideOverlay which displays a UI page from which you can render a table with the various groups the assigned to belongs to and make each group name clickable so that when's is clicked a hidden variable is set which is the one that's going to be used to set the assignment_group field.



Thanks,


Berny


View solution in original post

5 REPLIES 5

Renuka8
Kilo Guru

Hi Berny,Ali



I have similar requirement could you please let me know if you were able to achieve this.



Regards,


Renuka