How could a SetValue for a UDF cause a screen corruption in Sales Order Data Entry?

While creating a UDS to dynamically display the total order gross profit  for a sales order, I discovered that a change to a UDF in the SO_SalesOrderDetailed table while in the Sales Order Data Entry lines panel corrupted the UI display even though the script has no UI references.

I simplified the behavior with a single SetValue (without a subsequent Write) statement that stores a UDF in a Post Read event script. Worse things happen if a Write is added.

r = oBusObj.SetValue("UDF_ExtensionAmt", 100)

The screen corruption is to previously selected ItemCode field display values as shown in this quick video

This happens in sage version 2021 (7.00.2.0) and 2022 (7.10.2.0)

Parents Reply Children
  • 0 in reply to Kevin M

    No loops, just that single statement. It's the ENTIRE script. I purposefully isolated the screen corruption it to as small a script as possible. I did try the grid update trick, but it didn't help.

  • 0 in reply to connex

    Perhaps try InvokeChange instead?  I'm not sure on the syntax for a grid value, but I think someone posted an example somewhere...

    If CBool(oScript.UIObj) Then ' use invoke change so the UI is refreshed properly
    	Set myUIObj = oSession.AsObject(oScript.UIObj)
    	'retVal = oSession.AsObject(oSession.UI).MessageBox("Setting freight amount through InvokeChange")
    	retVal = myUIObj.InvokeChange("FreightAmt", nManualFreight)
    	Set myUIObj = Nothing
    else ' otherwise just set the value
    	retVal = oBusObj.SetValue("FreightAmt",nManualFreight)
    End If

  • 0 in reply to Kevin M

    Thanks again. I also tried this for the field (ItemCode) that experiences the corruption without success. By my isolating this to an easy to recreate issue across multiple current versions I had hopes that either or would comment or forward to engineering.