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

How to refresh a related list via script/ui action

geek1
Kilo Contributor

Hi everyone,

I have a related list that should only appear after a field changes on a form and because of this, the related list has to refresh.

I found a UI action that people have mentioned works here on the forums but when clicking the button, it doesn't refresh or appear to do anything.

Below is my UI action on the related list.

Client: check

List banner button: checl

Onclick: refreshAffectedCIs()

Condition: RP.isRelatedList()

Script:

function refreshAffectedCIs(){

    GlideList2.get(g_form.getTableName() + '.REL:a38ec8cd4f5a02004b5b76601310c7d3').setFilterAndRefresh('');    

}

Am I missing something?


Thanks!

1 REPLY 1

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Geek,



Please refer the below thread and let me know if you are still blocked.


Reload a Form or Related list from a Client Script - ServiceNow Guru