Sage 100

 View Only
  • 1.  SetError in script returning Yes/No message box

    Posted 08-03-2022 13:59
    I am setting a simple script to not allow a condition. Its set as a Table Pre-Write & it executes when it should, but it returns a Yes/No message box instead of the typical OK warning box. What am I missing or overlooking?


    if sTag = "OVERAGE" then
       sMsg = "Not allowed to allocate OVERAGE items"
       retVal = oScript.SetError(sMsg)
    End If


    I tried it this way too:
    sMsg = "Not allowed to allocate OVERAGE items"
    if sTag = "OVERAGE" then
       retVal = oScript.SetError(sMsg)
    End If

    ------------------------------
    Dana Young
    Lehman Wesley & Associates
    ------------------------------


  • 2.  RE: SetError in script returning Yes/No message box

    Posted 08-03-2022 15:18
    Are you sure you don't have extra copies of the script set up?  Recompiled after the latest changes?  Re-opened SO entry after recompile...?

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



  • 3.  RE: SetError in script returning Yes/No message box

    Posted 08-04-2022 13:10
    No extra copies. I looked at the files from the CM folder & they look like they do on the front end. I took it off the table, saved it, then went back & added it fresh, recompiled. Restarted Sage, so definitely new SO Entry screen. It still giving me a dang Yes/No. I mean, it works, but its odd & they may get confused by that message, wondering what they are supposed to click since both buttons works like OK.

    ------------------------------
    Dana Young
    Lehman Wesley & Associates
    ------------------------------



  • 4.  RE: SetError in script returning Yes/No message box

    Posted 08-04-2022 13:13
    Very odd.  Maybe someone with access to source code might provide some insight.  I don't know of a way to get a Yes / No pop-up without MessageBox options.

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