I have multiple scripts that use EofF and Loop routines. The scripts work correctly on my laptop and other computers. For one customer running Sage 100 2020.2 on the Windows 2019 server they are not running. I am at a loss.
The UDF on the Header will write to the first line of the Sales Order Line UDF then stops:
retVal = 0 : ocsVal = ""
HeadTN = "" : LineTN = ""
retVal = oBusObj.GetValue("UDF_TRACK_NO$",HeadTN) 'Getting Tracking No from Header
set oLines = oBusObj.AsObject(oBusObj.Lines)
retVal = oLines.MoveFirst()
Do Until oLines.Eof ' loop through all lines searching to write tracking no
retVal = oLines.SetValue("UDF_LN_TRACK_NO$",HeadTN)
retVal = oLines.Write()
retVal = oLines.MoveNext()
Loop
*Community Hub is the new name for Sage City