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

What is listID passed on to the g_list.get('<listID>') Api?

Prasant Kumar 1
Kilo Sage

What is listID passed on to the g_list.get('<listID>') Api? and how to get listId for particular list view in servicenow?

1 ACCEPTED SOLUTION

you can try something like below. 

 

GlideList2.get(g_form.getTableName() + '.YOUR_RELATED_LIST_NAME_HERE').setFilterAndRefresh('');

View solution in original post

3 REPLIES 3

Community Alums
Not applicable

Hi,

 

The listID is the name of the list, which is usually the table name.

You can use this link  to check all the APIs and way to fetch view of your current list

 

Please mark as CORRECT if this solves your query

Thanks,
DR

hi,

Thanks for the reply but,

my requirement is :- GlideList2.get('<listID>').setFilterAndRefresh('');

to refresh the related list of a form.

how i will fetch the listId of list?

 

you can try something like below. 

 

GlideList2.get(g_form.getTableName() + '.YOUR_RELATED_LIST_NAME_HERE').setFilterAndRefresh('');