Sage 100

 View Only
  • 1.  Scripts being called that don't exist

    Posted 10-09-2024 17:26

    Problem:

    Scripts are failing that don't exist:

    • Hundreds of records are being written to the Sage Activity Log every day for JT_WorkTicketParts and SO_SalesOrderDetail because of script failures.
    • There are NO scripts attached to these business objects.
    • This is version 2022 Premium (and JT = Ops Management not PM)
    • Scripts are compiled.

    Is there a way to find out what could be the source of these script errors?  @Alnoor Cassim ? @Kevin Moyes



    ------------------------------
    Jane Scanlan
    Partner
    Next Level Manufacturing Consulting Group
    ------------------------------


  • 2.  RE: Scripts being called that don't exist

    Posted 10-09-2024 17:46

    Jane - With File Explorer, looks for compiled master business object script files in the \Mas90\CM\Script folder. Inside of those are the subroutines (the "subs") for every event script you've created for the object. For example, let's say you find a SO_SalesOrderDetail.vbs file and inside it you see something like this:

    Sub PostValidation_ItemCode500(column,value)

    This means at one point a PostValidate event script for ItemCode was created. Whatever is between this and the End Sub for it, will execute every time an item is entered on the SO lines. If there is an oSession.WriteLog in there, then bingo that would be one place where the Activity Log is being written to.

    You may also see other Sub's in there for other events. 

    ** I've seen it where the original script file that is normally maintained and then compiled is missing but the contents of the script are still in the compiled master object VBS file. This means it will STILL execute if you hit the event that it runs on. 

    ** If you determine that nothing in your master VBS file should be executing then simply rename or delete the file.

    Also look for SO_SalesOrder_bus.vbs, PO_PurchaseOrder_bus.vbs, PO_PurchaseOrderDetail_bus.vbs, etc. Also for JT*.vbs

    Hope that helps.



    ------------------------------
    Alnoor Cassim
    Accounting Systems, Inc. (ASI)
    ------------------------------



  • 3.  RE: Scripts being called that don't exist

    Posted 10-09-2024 18:18

    What Alnoor said!

    Here's a visual of the kind of file you are looking for in the ...\MAS90\CM\Script\ folder:

    In the past I have seen scripts deactivated, but the compiled VBS was left behind, and still functional.

    You can look at CM_ScriptLink to see what business objects "should" have active scripts (with an associated .vbs file).



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



  • 4.  RE: Scripts being called that don't exist

    Posted 10-10-2024 17:45

    Guys,

    There are no JT_WorkTicketParts.vbs or SO_SalesOrderDetail.vbs files under the ..\CM\Script folder, nor does the file CM_ScriptLink.m4t exist when in DFDM (see screen shot below). I did find SO_SalesOrder_bus.vbs and opened and looked at it and didn't find anything that didn't belong; I did not find JT_*anything*_bus.vbs.

    Now what?  This system is a bit messed up (I have created no scripts, nor modified any, since reconnecting with this customer from the past). 

    Should I create simple scripts that tie to SO_SalesOrderDetail and to JT_WorkTicketParts and then look at the JT_WorkTicketParts.vbs and SO_SalesOrderDetail.vbs files under the ..\CM\Script folder to see if it now contains junk script info?  



    ------------------------------
    Jane Scanlan
    Partner
    Next Level Manufacturing Consulting Group
    ------------------------------



  • 5.  RE: Scripts being called that don't exist

    Posted 10-10-2024 17:59

    Just type CM_ScriptLink into DFDM... instead of browsing there.  Sage will find the file where it is (either SQL or an M4T).



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



  • 6.  RE: Scripts being called that don't exist

    Posted 10-10-2024 19:22

    THANK YOU @Kevin Moyes ... I'm in there now and so far I found one invalid script reference, which I can delete right?  And then I'll recompile the scripts to be sure.  Hope to have this bugger finally rectified!



    ------------------------------
    Jane Scanlan
    Partner
    Next Level Manufacturing Consulting Group
    ------------------------------



  • 7.  RE: Scripts being called that don't exist

    Posted 10-10-2024 19:32

    I'd use custom office to delete the script link, instead of dealing with the raw data directly.  There might be more settings in other files... but yes, if you don't need the script logic, it should be safe to delete the link.



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



  • 8.  RE: Scripts being called that don't exist

    Posted 10-11-2024 19:03

    @Kevin Moyes the 4 bad records I deleted out the SY_ScriptLink file solved the problem - no more failed scripts.  Thanks again!



    ------------------------------
    Jane Scanlan
    Partner
    Next Level Manufacturing Consulting Group
    ------------------------------