Notifications

145 views

Symptoms


When using a UI Action on a related list using a GlideDialogWindow, you may encounter where the dialog window will not fully load

showing an image similar to what you see below with most likely a different title.

There will also be an error thrown in the console similar to this:

Uncaught TypeError: Cannot read property 'getChecked' of undefined

 

 

Cause


This is happening because the reference to the g_list is being used in the get() method of GlideList2 within the UI Action.

This would look like this:  GlideList2.get(g_list);

This will work on lists, but not on related lists.

Resolution


There is a simple fix to this, which is to instead reference the listID of the g_list.

Depending on what is the need there are many ways of doing this. An example looks like this:

 

var listID = g_list.listID;

var list = Glidelist2.get(listID);

 

This will allow the record that the related list is on to perform GlideList2 methods, such as getChecked().

 

Article Information

Last Updated:2018-08-14 10:16:05
Published:2018-08-14