How to pass/initialize custom field value from salestable to SalesparmTable using extensions and then to custinvoicejour?

hi all,

I created a custom field in salestable table and salesparmtable.

whenevever i click on confirm salesorder , the saleseditline form wil form, there i want to initialize my custom field value in salesparmtable from salestable.

i tried COC on Table method salesParmTable->initfromSalesTable method. but getting the error

“Argument to method getFieldValue out of range”.

Any suggestions