Sage 100

 View Only
  • 1.  Scripting "short circuit..

    Posted 10-20-2020 15:06
      |   view attached
    Hi All.   I have a client on PM (that is a whole other story).   There is a UDF on the BOM for "Approved".  I have written a PreWrite script that goes out and looks for this field, if it is not set to Approved, it has a seterror that says it is not an approved script.   Works just fine when you click Accept.   However they click Print Work Ticket..   It gives an error "Cannot access BOM Object".  For fun, I changed it to simply a message box and it comes up as expected.    Is there a way to get around the object error and prevent processing?  

      I have attached the script.   Thanks in advance!

    ------------------------------
    Bob Osborn
    Consultant
    ACI Consulting
    ------------------------------

    Attachment(s)

    txt
    BOMApproval.txt   1 KB 1 version


  • 2.  RE: Scripting "short circuit..

    Posted 10-20-2020 15:34
    Filter the script by StartProgram?

    If oSession.StartProgram = "SO_SALESORDER_UI"...



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



  • 3.  RE: Scripting "short circuit..

    Posted 10-20-2020 15:48

    Hi Kevin,

       Interesting idea but not sure how to implement.   It is only in Work Ticket Entry, need it to fail before going to work ticket printing..  Maybe replacing the Quick Print button with something else? 

     

    Thank you,

     

    Bob Osborn

    ACI Consulting

    p 714.282.0378 ext. 402    f 714.282.0235

     

    Bob@ACIconsulting.com

     

     ACISignature1                  

    MCP_SE_Small.bmp

    This communication, including attachments, is confidential and may contain proprietary information intended only for the proposed recipient. Please notify the sender and delete this message if you believe that you have received this message in error or if you are not the proposed recipient. Unauthorized disclosure, copying, or distribution of the information is strictly prohibited.

     

     

     

     






  • 4.  RE: Scripting "short circuit..

    Posted 10-20-2020 15:52
    Sorry... I thought you were saying the error was coming up from work ticket printing, not from a quick print for a new WT.
    Can you flow the checkbox into the WT earlier in the creation process (so the extra object isn't needed in the Pre-Write script)?

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