Input sales order number into the Engineering Workbench as a new ECO

We Are using the task function on the EW as a task list for sales order processing. I have set up a customised button to load the ECO record if pressed, but I would like it to perform the "get new id" method then populate the groupid as the sales order.

Any ideas on this??