Sage 100

 View Only
  • 1.  Default Bank Code per User

    Posted 04-29-2022 15:07
    Is it possible to set a default bank code in AP Manual Check Entry & AP Check Printing by User Code?
    Was trying to script it, but any of the events I pick, even UI, doesn't touch that bank code. I can't get it to trigger correctly when loading the page, etc.

    Any thoughts if this can work?

    ------------------------------
    Dana Young
    Lehman Wesley & Associates
    ------------------------------


  • 2.  RE: Default Bank Code per User

    Posted 04-30-2022 13:34
    You could use a UDT to hold the user code/login and another field to hold the bank code vs hardcoding a select case statement in the script.  Using a UDT would allow the end user to maintain the mapping long term.

    As for the event, for AP Manual Check Entry, the UI Post Load event on the dMain panel worked for me.  All I had to use to set the value was oUIObj.InvokeChange "BankCode", "A"

    For AP Check Printing, UI events aren't normally exposed for report/printing tasks but you can usually set up your script on another panel and then open CM_UIScriptSettings with DFDM, navigate to the record you just created and modify the library name (must be UPPERCASE) and panel name (if needed, must be UPPERCASE) so it matches the report/printing task.  In your case, library name would be AP_CHECKPRINTING.M4L and the panel would be DMAIN.  If you added the script to a completely unrelated panel, when prompted to remove the key, click yes, otherwise, if you are modifying the record created when  assigning the script to the manual check entry's dMain panel then do not remove the key as you need both.  Then use the User Defined Script Maintenance task to compile scripts for the UI events.  If you did assign the script to a placeholder panel and compiled it prior to modifying the record CM_UIScriptSettings, then you should delete the *.M4L.vbs script file in MAS90\CM\Script that was created for the placeholder library.

    Since you are using the same event and want the same output in both tasks, you should be able to have a single script containing all of the logic assigned to both panels.


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



  • 3.  RE: Default Bank Code per User

    Posted 05-10-2022 15:47
    I think I will only need it for AP Manual Check & this method worked perfectly. Using the UDT is a great idea too so they can add new users. Thx for the help!!

    ------------------------------
    Dana Young
    Lehman Wesley & Associates
    ------------------------------