Yes, That what I did. the problem is that I only get the fields name and value and not the table. 

Unfortunately, dot walking does not work with setValue() , for example gr.setValue ('assigned_to.email', 'my@email.com') doesn't work even if you call updatewithreferences() in the end. 

To bypass that problem, I created a string that contains the script syntax, for example, it's generating these commands: gr.assigned_to.email= 'my@email.com'; and gr.updatewithreferences() and run it with evaluate script command.