Scripting

  • 1.  Hello all! I've utilized the fantastic script that

    Posted 09-23-2015 15:27
    Hello all! I've utilized the fantastic script that was provided to us in the scripting class at MOTM last year to print a report from a button. That one was for printing an SO from the PO entry screen, I modified it to print the Packing List from a button on the Shipping Data Entry screen. The customer wants to print this without having to exit/save the shipping order. Sooo, I have the button working, but of course it won't work when it's a new order, only a saved order. Is there a way to save the order when they click the button without invoking the Accept button, basically without having it close the order they're looking at?


  • 2.  RE: Hello all! I've utilized the fantastic script that

    Posted 09-24-2015 10:34
    Some time ago, @DanBurleson wrote a script to calculate a shop fee line based on the value of the other lines in SO data entry. Before the additional line could be generated, the SO had to be saved. He was able to accomplish this by saving the order then automatically reopening it. No user intervention was required. It isn't quite what you are trying to do but the user only pressed the button once.


  • 3.  RE: Hello all! I've utilized the fantastic script that

    Posted 09-24-2015 11:38
    Thanks so much Jeff, I worded my request wrong, that's exactly what I needed to do! I really appreciate your help!


  • 4.  RE: Hello all! I've utilized the fantastic script that

    Posted 09-24-2015 11:51
    @JeffSchwenk has SOME memory. I don't remember scripts that wrote last month let alone 5 years ago! My archives indicate I fixed Jeff's issue by moving my script to the Pre Totals event, but since the shipping data entry doesn't have totals - one would have to leave the order (rather invoice) in order to trigger that event.


  • 5.  RE: Hello all! I've utilized the fantastic script that

    Posted 09-24-2015 13:20
    Haha, I feel the same way! I was actually able to just invoke the accept button & then reopen the order: retVal = oBusObj.SetValue(""SalesOrderNo$"", sSO) retVal = oBusObj.Write() Do you see any reason that might be an issue?


  • 6.  RE: Hello all! I've utilized the fantastic script that

    Posted 09-24-2015 14:20
    Not if you can relax your requirement ""without having to exit/save the shipping order."" Exiting and coming back? Good idea!


  • 7.  RE: Hello all! I've utilized the fantastic script that

    Posted 09-24-2015 14:26
    Thanks! I appreciate your help!