Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

Linked Cases Related list Add Button for Agent Workspace for HR Case Management

saic2
Tera Contributor

I need a Related List with name as Linked Case with the configuration need to link the 2 different Employee Relation cases into one. For this I have created a many to many Definition with the below Information 

saic2_0-1760597371692.png

i have created a Relationship as well with below code 

 

(function refineQuery(current, parent) {
    var cu = current.sys_id;
    var par = parent.sys_id;
    current.addEncodedQuery("u_sn_hr_er_case_from.sys_id="+par +"^ORu_sn_hr_er_case_to.sys_id="+par+"^ORu_sn_hr_er_case_fromSTARTSWITHhrc" );  
})(current, parent);
 
can someone help me with the next procedure and if the above code is correct or not i am unable to figure it out.
1 REPLY 1

jcmings
ServiceNow Employee

Are you able to use parent/child relationships or the existing Related Cases related list?