Sage 100

 View Only
  • 1.  Can't get script to cooperate

    Posted 10-14-2020 15:03
    First, I'm a complete novice at this so be kind. I was able to get a similar version of this very simple script to work for another client (with a slightly different calculation), but for some reason it's not working at another client's site. Everything is set up the same (I think). It's a line item calculation based off the quantity shipped and a UDF that pulls a value from CI_Item, then just some maths. What am I missing? All I get is zeros. I tried changing the calculation to just one of the variables (no calc) just to see if it would populate. Still zeros, so I'm thinking it's not the script but the screen recognizing it exists. Yes, I attached the script to the screen as seen below. This is Sage 100 2018 Advanced. Not sure what else I should check, so any guidance would be appreciated. #scripting



    ​​

    ------------------------------
    Bill Pfahnl
    Nims & Associates
    ------------------------------


  • 2.  RE: Can't get script to cooperate

    Posted 10-14-2020 15:42
    Company maintenance, Allow External Access (checkbox).

    ------------------------------
    Kevin Moyes
    Technical Systems Analyst
    Munjal White Consulting Co.
    Toronto ON
    ------------------------------



  • 3.  RE: Can't get script to cooperate

    Posted 10-14-2020 16:25
    Edited by Alnoor Cassim 10-14-2020 18:32
    Also you should condition for any situation that could make UDF_CASEQTY be 0 so you don't get a Division by Zero error:
    If numCase > 0 Then  retVal = oBusObj.SetValue("UDF_NOLABELS", numQty / numCase)

    ------------------------------
    Alnoor Cassim

    Email: alnoor@asifocus.com
    Ph: 949-689-9887
    Orange County, CA
    ------------------------------



  • 4.  RE: Can't get script to cooperate

    Posted 10-14-2020 16:33
    Excellent! Thank you @Alnoor Cassim

    ------------------------------
    Bill Pfahnl
    Nims & Associates
    ------------------------------



  • 5.  RE: Can't get script to cooperate

    Posted 10-14-2020 16:25
    D'oh! That was it. Thank you @Kevin Moyes.​

    ------------------------------
    Bill Pfahnl
    Nims & Associates
    ------------------------------