How to Add a Scripted Relationship Related List for Attachments

Su522
Kilo Sage

Can someone please help me with this script?

I need to add a scripted relationship for a Related List on the Order Task table for attachments from the associated Customer Order.

 

Here is the code I have:

(function refineQuery(current, parent) {
current.addQuery('table_sys_id=' + parent.parent.parent.sys_id);
})(current, parent);
 
But it is returning all the attachments with empty Table Sys IDs
(see attached)
 
Help is greatly appreciated!!
Thank you

 

 

 

 

1 ACCEPTED SOLUTION

ssellmeyer
Tera Guru

Try:

(function refineQuery(current, parent) {
current.addQuery('table_sys_id=' + parent.parent.order_line_item.order.sys_id);
})(current, parent);

View solution in original post

1 REPLY 1

ssellmeyer
Tera Guru

Try:

(function refineQuery(current, parent) {
current.addQuery('table_sys_id=' + parent.parent.order_line_item.order.sys_id);
})(current, parent);