Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

HOW TO REFRESH THE RELATED LIST

Tejas Adhalrao
Kilo Sage

how to refresh the specific related list using client and server script.

6 REPLIES 6

Ankur Bawiskar
Tera Patron

@Tejas Adhalrao 

you will find lot of UI actions which work on form and refresh related list

See that and ensure you use the correct related list name

AnkurBawiskar_0-1764060930765.png

something like this

// Replace 'task_list' with the actual name of your related list
var relatedListName = 'task_list';

// Get the GlideList2 object for the related list
var gList = GlideList2.get(g_form.getTableName() + '.' + relatedListName);

// Refresh the related list
if (gList) {
    gList.setFilterAndRefresh('');
}

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar ,

why this  not working TejasSN_LogicX_0-1764061343408.png

 

related list 

TejasSN_LogicX_1-1764061420051.png

please help

 pls help with this

@Tejas Adhalrao 

did you check if it's going inside that IF at Line 12?

 

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader