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

Refresh List after showQuickForm() UI Action not working

Daniel203
Giga Contributor

Hi All,

I have a UI Action as a List banner button which I want to open a dialog box update, close multiple catalog tasks at the same time selected from a list. It works fine, updates and closed all tasks, however I cannot get the list to refresh once the action has completed.

 

find_real_file.png

This in true in our dev and test instances. Things I've tried;

  1. Without adding any of my own refresh logic (as pictured above). Should a list refresh be triggered by default from showQuickForm()?
  2. Client-side refresh from script of the UI Action
    • reloadWindow(window)
    • g_list.refresh(1)
    • top.gsft_main.location.reload();
    • GlideList2.get("sctask").refresh();
    • GlideList2.get(sc_task).setFilterAndRefresh('');
    • //Refresh the list of tasks
      if (GlideList.lists) {
      	var list = GlideList.get(name);
      	if (list) {
      		list.refresh();
      	}
  3. Server-side refresh via an event.
    • gs.eventQueue('iam.refresh.list', current, null, null); which in turn triggered a Script Action 
    • Same event which triggered a business rule

I've seen most of these methods work at least on the initial test. This behavior is consistent with all my attempts to fix the issue

Any help/insight is appreciated.

Cheers
Daniel

1 ACCEPTED SOLUTION

Daniel203
Giga Contributor

I logged an incident in HI and worked through this issue with support.

The root cause, refreshing a list from UI Action, looks to be caused by a URL character encoding issue on a menu module I created using URL from arguments. The issue occurs when attempting to manually construct the URL to control the sort order, which I was doing, by following the official documentation https://docs.servicenow.com/bundle/helsinki-platform-administration/page/administer/list-administrat....

However the character “^” must be encoded correctly with “%5E” in the URL when adding it to a Menu Module’s “URL (from arguments)” type.

While manually constructing the URL by following the docs site to control the sort does display as desired. This character encoding issue makes the refresh functionally post running a UI action stop working.

Happy this is now resolved.

View solution in original post

6 REPLIES 6

Daniel203
Giga Contributor

At this stage I think there must be something else which is stopping the refresh from happening rather than wrong code. Any suggestions of what may interrupt a refresh process?

Daniel203
Giga Contributor

I logged an incident in HI and worked through this issue with support.

The root cause, refreshing a list from UI Action, looks to be caused by a URL character encoding issue on a menu module I created using URL from arguments. The issue occurs when attempting to manually construct the URL to control the sort order, which I was doing, by following the official documentation https://docs.servicenow.com/bundle/helsinki-platform-administration/page/administer/list-administrat....

However the character “^” must be encoded correctly with “%5E” in the URL when adding it to a Menu Module’s “URL (from arguments)” type.

While manually constructing the URL by following the docs site to control the sort does display as desired. This character encoding issue makes the refresh functionally post running a UI action stop working.

Happy this is now resolved.