I'm creating a script to auto-populate an SO_Detail UDF (UDF_SHIP_REF1) so that I can pass data to StarShip. The goal is to concatenate the item number with the Customer PO Number (i.e. "3131000 / 123456789" )
I have developed a more detailed script (at the bottom of this post), but it doesn't work.
In trying to build on any success, I stripped out everything to just get a single bit of data into the UDF. Again, without success
Any Ideas where I'm off?
STRIPPED SCRIPT
dim ref1
ref1 = ""
ref1 = "Testing of UD scripting"
retval = oBusObj.SetValue("UDF_SHIP_REF1$", ref1) 'into so_salesorderdetail.
DETAILED SCRIPT
dim retVal
dim item
dim po
dim ref1
item = ""
po = ""
ref1 = ""
retVal = oBusObj.GetValue("ItemCode$", item) ' from so_salesorderdetail.
oBusObj.ReadAdditional "SONumber"
oSession.AsObject(oBusObj.GetChildHandle("SONumber")).GetValue "CustomerPONo$", po
'ref1 = item & " / " & po
ref1 = "Testing of UD scripting"
retval = oBusObj.SetValue("UDF_SHIP_REF1$", ref1) 'to so_salesorderdetail.