Sage 100

 View Only
  • 1.  Version 2018 Advanced button script runs once then doesn't start giving error message instead.

    Posted 01-25-2019 10:54
    Edited by Dan Burleson 01-25-2019 23:40
    A button script on Employee Maintenance runs a simple script with department and employee number parameters to load an employee photo. On launching Employee Maintenance the script always runs once successfully and subsequently generates the message "An error occurred while executing the link. [ 14/8050 ] Type: V Undefined" (image attached). (Error 14 Line 8050???).  Using Debug shows that the script is never entered after the first time. Has anyone seen this?

    I believe this is from module CMWSDA if someone could check the circumstance causing this error.

    x2Zq70FkQ0WCHZ3xZfJa_CustomizerError.jpg

    ------------------------------
    Dan Burleson
    Software Consultant
    Connex Software
    Corvallis OR
    541-224-6642
    ------------------------------


  • 2.  RE: Version 2018 Advanced button script runs once then doesn't start giving error message instead.

    Posted 01-26-2019 03:32
    That looks very similar to the error message i once got when i was experimenting with dynamically changing the link/path to a script file for a button in a post load script.

    Can you replace the script with something simple like the following and make sure it runs each time?
    oScript.DebugPrint "Test"
    Have you tried resetting the panel?
    Have you tried rebuilding customized panels?
    Have you verified there isn't another custom button on another panel in the library that shares the same name, i.e. BT_Link_1? I have seen sporadic problems when this occurs, best thing i found to do was to add another button forcing the sequence to increase, i.e. BT_Link_2, apply the script to it, then delete the old button.

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



  • 3.  RE: Version 2018 Advanced button script runs once then doesn't start giving error message instead.

    Posted 01-27-2019 22:53
    All good suggestions. Thanks David. I'll report back when I find the issue.

    ------------------------------
    Dan Burleson
    Software Consultant
    Connex Software
    Corvallis OR
    541-224-6642
    ------------------------------



  • 4.  RE: Version 2018 Advanced button script runs once then doesn't start giving error message instead.

    Posted 01-28-2019 03:29
    Edited by Alnoor Cassim 01-28-2019 03:30
    Hey Dan - You're right this "Type: V Undefined" is from CMWSDA but located in a generic fall through error trap so one can't actually tell where it error-branched earlier in CMWSDA. But if we traced it we could find out.

    A few thoughts / questions:

    1. Do they click your button manually or are you doing an InvokeButton from an event?
    2. *** Try changing the path in the button to a relative path as in  "..\CM\Script\Lnk002.txt" (w/o the quotes)
    3. If you placed the button in PMain, try it on DMain instead  (guessing at the panel names as I'm not on my 2018 machine)
    4. If possible post a snippet of your code. I'm curious to know how you show the image. In case you like the way Item Maintenance loads and resizes images (for the old eBiz Mgr reason), you could adapt that for your script like this:

      tmpFullFileName = sPath & sPic 'full path to the image
      tmpImage = tmpFullFileName & CHR(0) 'below function needs the null pad
      oScript.Execute "tmpImage$ = " & CHR(34) & tmpImage & CHR(34)
      oScript.Execute "N=DLL("+CHR(34)+"MASEXT32"+CHR(34)+","+CHR(34)+"PreviewImage"+CHR(34)+","+"tmpImage$"+")"
      '
      'MaxExt32.dll laid down by Sage to provide o/s hooks. Created in registry as a shared DLL, not a registered class)
      'meaning I don't know how to directly call it with VBS ergo call it with pvx
      'Above parses to this in pvx: N=DLL("MASEXT32","PreviewImage",tmpImage$)




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

    Free Agent Developer and Consultant
    CallForHelp.biz
    Email: alnoor@callforhelp.biz
    Orange County, CA
    ------------------------------