GlideModalForm: Related List Issue

Duc Vu Hoai
Tera Guru

Hi everyone,

I'm facing an issue when using

GlideModalForm

 to display a specific form popup. If the popup contains a related list, clicking on sorting or navigating to the next page in that list causes the records to disappear, as shown in the image below.

DucVuHoai_0-1741913889774.png

 

Here is my popup script:

var dialog = new GlideModalForm('Testing', 'table'); //Provide dialog title and table name
    dialog.setSysID(-1); //Pass in sys_id to edit existing record, -1 to create new record
    dialog.addParm('sysparm_query', 'u_pr_number=' + sysID);

    dialog.render(); //Open the dialog

 

I have raised a Hi support case for this, but I just wanted to ask if there is any workaround for this.

 

Thank you

 

1 ACCEPTED SOLUTION

Duc Vu Hoai
Tera Guru

This issue has been acknowledged by ServiceNow, and they are currently investigating it under:

PRB1868483: Embedded list disappears when the user clicks the Next button or sorts a column.

 

In the meantime, I’ve found a potential workaround:

The issue occurs because when you click on a column to sort or navigate to the next page, the query gets cleared.
As a workaround, you can use a Business Rule with the onDisplay flag to store the filter condition in sessionStorage.
Then, in the relationship configuration, you simply retrieve the filter from sessionStorage and return it as the query.

 

View solution in original post

2 REPLIES 2

Juhi Poddar
Kilo Patron

Hello @Duc Vu Hoai 

This could be useful to you: GlideModalForm 

Hope this helps!

 

"If you found my answer helpful, please like and mark it as an "accepted solution". It helps future readers to locate the solution easily and supports the community!"

 

Thank You

Juhi Poddar

Duc Vu Hoai
Tera Guru

This issue has been acknowledged by ServiceNow, and they are currently investigating it under:

PRB1868483: Embedded list disappears when the user clicks the Next button or sorts a column.

 

In the meantime, I’ve found a potential workaround:

The issue occurs because when you click on a column to sort or navigate to the next page, the query gets cleared.
As a workaround, you can use a Business Rule with the onDisplay flag to store the filter condition in sessionStorage.
Then, in the relationship configuration, you simply retrieve the filter from sessionStorage and return it as the query.