Relationship to show Parent case on Requested Item form Related List?

HARI KISHAN GVS
Mega Sage

Hi,

i tried to show Case record attached to Requested item as parent in related list of requested item form. But i am getting all the case records in related list.

Please correct my script to work properly.

find_real_file.png

2 REPLIES 2

Abhijit4
Mega Sage

Hi

There is problem in filter, first part should be field name in quotes and second part should be variable without quotes.

Try below,

current.addQuery("sys_id",parent.sys_id);

Let me know if you have any further queries.

Please mark this as Correct or Helpful if it helps.

Thanks and Regards,
Abhijit

 

By marking my response as correct or helpful, you contribute to helping future readers with similar issues.
Regards,
Abhijit
ServiceNow MVP

If you have case field on request form which is referring to Case table then you should use below filter.

current.addQuery("case",parent.sys_id); //replace "case" with actual field name on request item table referring to case record

 

If you have "Request Item" field on Case form which is referring to request item table then you should use below filter.

current.addQuery("request_item",current.sys_id); //replace "request_item" with actual field name on Case form

Let me know if you have any further queries.

Please mark this as Correct or Helpful if it helps.

Thanks and Regards,
Abhijit

By marking my response as correct or helpful, you contribute to helping future readers with similar issues.
Regards,
Abhijit
ServiceNow MVP