Sage 100

 View Only
  • 1.  Update or Replace a User Defined Script - v2024

    Posted 11-11-2024 09:46

    What is the best way to replace/update a user defined script?  At one time, you could not delete the script but it appears you can in v2024.  How do you "uncompile" it.  I have a new script (additional lines).

    I clicked on the delete button, then added it back.  Now when I compile the script, I encounter this error message.

    Where did I turn off the path.



    ------------------------------
    Jeff Schwenk
    Owner
    Bottomline Software, Inc.
    Waynesboro VA
    (540) 221-4444
    ------------------------------


  • 2.  RE: Update or Replace a User Defined Script - v2024

    Posted 11-11-2024 11:27

    The best way is to edit the source text file (but never the compiled VBS)... external text editors are fine, but if you do that always open the edited script in UDS maintenance to verify syntax (button) before you recompile.  After the edits, compile the scripts for that object. 

    There is no need to delete / add back.  You might not have added the script back using the same name, breaking the event triggers.  Try adding the event triggers back.

    For setting paths, always use relative paths, so you can recompile scripts from a workstation or the server (with a bonus of not having to relink after an upgrade).



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



  • 3.  RE: Update or Replace a User Defined Script - v2024

    Posted 11-11-2024 11:31

    BTW, the reason you can't edit the compiled scripts directly is that Sage stores a CRC value of the compiled file.  Manual edits change the CRC, basically disabling that script logic for the entire business object.



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



  • 4.  RE: Update or Replace a User Defined Script - v2024

    Posted 11-11-2024 11:59

    How do you delete all remnants of the UDS so one can start anew?



    ------------------------------
    Jeff Schwenk
    Owner
    Bottomline Software, Inc.
    Waynesboro VA
    (540) 221-4444
    ------------------------------



  • 5.  RE: Update or Replace a User Defined Script - v2024

    Posted 11-11-2024 12:05
    Edited by Kevin Moyes 11-11-2024 12:23

    The parts of an event script are: 

    • The named script in UDS maintenance.
    • The event triggers (in the table or panel).
    • The compiled VBS (which is made using the two above "ingredients", with integrity confirmed by the CRC).



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



  • 6.  RE: Update or Replace a User Defined Script - v2024

    Posted 11-11-2024 12:27

    Does the delete button remove this?



    ------------------------------
    Jeff Schwenk
    Owner
    Bottomline Software, Inc.
    Waynesboro VA
    (540) 221-4444
    ------------------------------



  • 7.  RE: Update or Replace a User Defined Script - v2024

    Posted 11-11-2024 12:33

    No.  UDS maintenance Delete only removes the script header, not the event triggers, or the compiled VBS. 

    If you recompile without the UDS entry it "should" effectively disable the removed script, but the event entries will still be there.



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



  • 8.  RE: Update or Replace a User Defined Script - v2024

    Posted 11-11-2024 12:47

    So this is a bit like cleaning up the printer files, user records, etc.  You can delete but the details remain.



    ------------------------------
    Jeff Schwenk
    Owner
    Bottomline Software, Inc.
    Waynesboro VA
    (540) 221-4444
    ------------------------------



  • 9.  RE: Update or Replace a User Defined Script - v2024

    Posted 11-11-2024 12:57

    Everything you add, one step at a time, has to be removed, one step at a time.  Nothing is automatic.



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