Update UDF in Sales Order detail line

Hi Folks,

   I am trying to get a UDF from serial/lot distribution screen into the sales order detail line.   I don't do scripts often enough to remember all details & I have been unable to locate actual copies of the reference materials mentioned in many posts (scripts.doc).   I know that most likely my setvalue line is wrong but don't know what the syntax would be for it.    Any help would be much appreciated.  

stringApplication = ""
retVal = oBusObj.GetValue("UDF_APPLICATION$",stringApplication)
retVal = oBusObj.SetValue("SO_InvoiceDetail_Bus_UDF_APPLICATION$",stringApplication)