Parent Object in relationship record script

arabeau
Kilo Contributor

Hi All,

trying to create a relationship for a related list between two custom (not extended from task) tables and in the relationship script everything starts with


(function refineQuery(current, parent) {

  //code here

})(current, parent);

 

what is the parent object passed into here and where does it come from? These are two not extended from task tables that haven't explicitly had a parent/child relationship defined (do I need to do this? how?) - how do I build this connection to work with the 'parent' object passed into this relationship record's script?

any help would be greatly appreciated!

1 ACCEPTED SOLUTION

Deepak Ingale1
Mega Sage

Parent object points  to the record on which you want to display the related list

For better understanding, please go though below link. It has nicely explained these details.

 

https://docs.servicenow.com/bundle/jakarta-platform-user-interface/page/administer/form-administration/task/t_ExampleTransactionsByUser.html

 

View solution in original post

1 REPLY 1

Deepak Ingale1
Mega Sage

Parent object points  to the record on which you want to display the related list

For better understanding, please go though below link. It has nicely explained these details.

 

https://docs.servicenow.com/bundle/jakarta-platform-user-interface/page/administer/form-administration/task/t_ExampleTransactionsByUser.html