Scripting

  • 1.  Sage 100 Premium 2016.1 - script on PO_PurchaseOrd

    Posted 09-18-2017 12:06
      |   view attached
    Sage 100 Premium 2016.1 - script on PO_PurchaseOrderDetail to set a UDF based on the value of several other fields including the required date field. Works fine if you edit the line, but does not fire if the required date line field is changed by changing the required date field in the header. It is attached to the events shown below (which includes all the comparison fields). Any ideas on getting it to fire when the header required date field is changed?


  • 2.  RE: Sage 100 Premium 2016.1 - script on PO_PurchaseOrd

    Posted 09-18-2017 12:16
    And you can't PostValidate against the PO Header Required Date (and go through the lines)?


  • 3.  RE: Sage 100 Premium 2016.1 - script on PO_PurchaseOrd

    Posted 09-18-2017 12:17
    If the line required date matched the previous header value, update the line UDF...


  • 4.  RE: Sage 100 Premium 2016.1 - script on PO_PurchaseOrd

    Posted 09-18-2017 12:36
    Would that interfere with whatever the header code does to the lines? At what point does that happen?


  • 5.  RE: Sage 100 Premium 2016.1 - script on PO_PurchaseOrd

    Posted 09-18-2017 12:43
    I thought PostValidate was after Sage's code ran, but maybe a M/D could confirm?


  • 6.  RE: Sage 100 Premium 2016.1 - script on PO_PurchaseOrd

    Posted 09-18-2017 13:14
    Sage should be done after postValidate on the field.


  • 7.  RE: Sage 100 Premium 2016.1 - script on PO_PurchaseOrd

    Posted 09-18-2017 13:26
    Yes script Post-Validate fires off after regular Sage validation is done.


  • 8.  RE: Sage 100 Premium 2016.1 - script on PO_PurchaseOrd

    Posted 09-18-2017 14:16
    So at that point the line required date field would already have been changed?


  • 9.  RE: Sage 100 Premium 2016.1 - script on PO_PurchaseOrd

    Posted 09-19-2017 06:16
    Got it working - thanks everyone!