Expanding Custom Function for creating child requests

Expanding Custom Function for creating child requests

We utilize a custom trigger and custom functions to automatically create child requests off of a parent request. I got sample scripts for this from this post: Script for creating new tickets based on information from one ticket (manageengine.com)

I was wondering what would be the best way to expand this to also automatically Link the parent request and the child requests. I tried modifying the childJson but couldn't get that to work the way I expected. I was probably doing something wrong, but maybe there's a better way of handling this?

                New to ADSelfService Plus?