Sage 100

 View Only
  • 1.  SetValue not displaying properly until "panel reload"

    Posted 12-17-2020 13:42

    It's one of those days where I can't understand the simplest scripts. I have a Post Validate script on PO Header Division No to conditionally set a new Ship To Address and Warehouse Code if Division equals X. I can see the right value and description set and display for the Ship To Code and the right description for the Whse Code but not value, not until I move to another tab and then come back. Is there a reason for this, and a way to force a reload of the screen/order like there is for GD_Lines?

     #scripting



    ------------------------------
    Amber Prayfrock, Blytheco
    ------------------------------



  • 2.  RE: SetValue not displaying properly until "panel reload"

    Posted 12-18-2020 01:16

    You should check if the UI is present using oScript.UIObj <> 0 and use either oSession.AsObject(oScript.UIObj).InvokeChange to set the value or use oBusObj.SetValue like you are currently and at the end of the script, use oSession.AsObject(oScript.UIObj).RefreshScrn



    ------------------------------
    David Speck II
    Tennessee Software Solutions
    ------------------------------



  • 3.  RE: SetValue not displaying properly until "panel reload"

    Posted 12-18-2020 07:45

    Thank you very much, David. I used the UIObj route since I wanted to understand better how to use the InvokeChange functions. I appreciate your help!



    ------------------------------
    Amber Prayfrock, Blytheco
    ------------------------------