BraxtonM
Tera Contributor

dialog.setPreference('sysparm_query','parent='+sysID); //copy the change sys_id to the parent field

 

This line is the key. Adding the value to the query will populate the field in the modal form.