EoF and Loop not working

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.  

  • That's a serious claim. How about you show us the code in and around the routine and your comments on the difference in the data between machines.

  • Allow External Access (checkbox in company maintenance).

  • 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