Sage 100

 View Only
  • 1.  How Might One Trigger a UI script (or any UDS) at the conclusion of a V/I job?

    Posted 10-04-2022 17:37
    I need this script to run once each time one or more records are written. The script is currently a UI script for panel exits from a module data entry program. It checks whether a change has been made and then does it's thing - just once per session.

    I would not like to have to re-write the script as BOI nor as a forgettable manual button script.

    ------------------------------
    Dan Burleson
    Software Consultant
    Connex Software
    ------------------------------


  • 2.  RE: How Might One Trigger a UI script (or any UDS) at the conclusion of a V/I job?

    Posted 10-07-2022 16:06
    No one?

    ------------------------------
    Dan Burleson
    Software Consultant
    Connex Software
    ------------------------------



  • 3.  RE: How Might One Trigger a UI script (or any UDS) at the conclusion of a V/I job?

    Posted 10-07-2022 16:19
    Edited by Alnoor Cassim 10-07-2022 16:35
    I had this reply for you last night but then I thought it was too lame and not what you're really after ...

    Hi Dan - Since V/I uses the same business objects as scripts, it will automatically fire off a business script, if found, when it writes a record. If possible, and I don't know about the complexity of what your UI script does, you can potentially condition your UI script to also run on business PreWrite or PostWrite OR make a copy of your UI script and modify it to only support running on business PreWrite or PostWrite . For example, I have a simple V/I import to AP_Vendor that uses APDivisionNo, VendorNo, and and HoldPayment. I'm assigning HoldPayment="Y". I also have a PreWrite script that does this silly thing below but only runs from a V/I import. When I run the import my UDF_TEST1 from script is populated with a random number. I'm thinking you knew all this already but was looking for some magic.

    You can fire off Perform Logic set to run on Job Completion but I don't see that helping you here. In the end you can't fire off UI Script at any place in the import without actually firing off the UI since the script is contained to the form and panel. 

    If Left(oSession.StartProgram,4)="VIWI" Then
    
    Randomize
    nRandom = Round(100*Rnd,2)
    rV = oBusObj.SetValue("UDF_TEST1",nRandom)
    
    End If
    


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



  • 4.  RE: How Might One Trigger a UI script (or any UDS) at the conclusion of a V/I job?

    Posted 10-07-2022 16:42
    Maybe I should have put my opening sentence like this:
    "I need this script to run ONLY ONCE each time one or more records are written." In other words, if 1,000 records are modified it should only run once. There nothing inherently UI about the script is is all about the timing and frequency. Once per session. I am using this script to populate work tables to work around encryption and for performance. It would be great if I could trigger a UDS from Peform Logic, but is that just wishful thinking?

    ------------------------------
    Dan Burleson
    Software Consultant
    Connex Software
    ------------------------------



  • 5.  RE: How Might One Trigger a UI script (or any UDS) at the conclusion of a V/I job?

    Posted 10-07-2022 16:42
    I only know how to trigger a batch file upon completion, not run a script.
    Would you be able to chain your job to a second import (something like setting a date/time to a UDT), and have your script fire as a UDS triggered by the UDT edit?
    (Just trying to think outside the box).

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



  • 6.  RE: How Might One Trigger a UI script (or any UDS) at the conclusion of a V/I job?

    Posted 10-07-2022 17:20
    I like it!

    I could even bring it back into the "box" by calling the UDT a "WorkTableFillLog" and record the Date/Time it was last run thus triggering a one-time post write script per V/I job.

    Thanks @Kevin Moyes



    ------------------------------
    Dan Burleson
    Software Consultant
    Connex Software
    ------------------------------