query related to ui action

AnithaAnumanthu
Tera Contributor

Hi ,

 

requirements is:

there is related link(ui action ) on incident form, when click related link name is "show only records which have caller id is abel tuter"  should show  only   list of record of caller id and caller id should show on url.

Ex. on incident form caller_id= abel tuter, when you click on that link , show list of  record of abel tuter.

15 REPLIES 15

RAMANA MURTHY G
Mega Sage
Mega Sage

Hello @AnithaAnumanthu ,

 

Please try the below code in UI Action, it works in my PDI as per your requirement

showIncidents();

function showIncidents(){
	var query = "caller_id="+current.caller_id;
	var url = "./nav_to.do?uri=incident_list.do?sysparm_query="+ query;
	action.setRedirectURL(url);
}

  

RAMANAMURTHYG_0-1694751183077.png

RAMANAMURTHYG_1-1694751219279.png

 

Please mark my answer correct and helpful, if it works for you.

Thank you

Please mark my answer helpful  & correct if it helps you
Thank you

G Ramana Murthy
ServiceNow Developer