I wonder if the Paya Connect Desktop was stopped if the error would appear.
Original Message:
Sent: 03-10-2025 06:55
From: Beth Bowers
Subject: Custom Office update "File in use"
So, @Alnoor Cassim - I'm curious. I had stopped the Sage service (this was on Adv) and was running Sage 100 in MAS90 mode. I still got the error, until I renamed Links. Were the Credit Card and Avatax mods "actively running", in that instance?
------------------------------
Beth Bowers
(269) 358-0989
------------------------------
Original Message:
Sent: 03-10-2025 02:47
From: Alnoor Cassim
Subject: Custom Office update "File in use"
Doug you are correct those situations wouldn't cause the "in use" error. Any external app that uses ODBC is by definition a read-only connection. Now if the external app uses BOI, then if they're using AR_Customer_svc, they're still fine. But if it uses AR_Customer_bus because it needs to write back data, and the app is actively running at the same time you are updating UDFs, then we have a problem.
------------------------------
Alnoor Cassim
Accounting Systems, Inc. (ASI)
Original Message:
Sent: 03-10-2025 02:38
From: Doug Higgs
Subject: Custom Office update "File in use"
@Alnoor Cassim If KnowledgeSync, Excel / F9 or other external program has an open connection to AR_Customer.m4t ( per your example), would the error occur? Because these would be read only connections they shouldn't cause the exclusive access error?
------------------------------
Doug Higgs
Midwest Commerce Solutions, Inc
(312) 315-0960
Chauffeur, Chef, and Personal Assistant to Sprinkles
Original Message:
Sent: 03-10-2025 00:26
From: Alnoor Cassim
Subject: Custom Office update "File in use"
Speaking with my MD hat on. This explanation will 99% not make sense and be clear as mud but here goes.
When an MD adds code in their override for an update program, such as SO_SalesJournal_upd.pvc, and when that includes instantiating a business object (for those of you who script, this is called GetObject or NewObject for the purpose of writing or reading to a different file/table), and the MD does that in what's called the ON_CREATE block of their override program, which sets initial variables and connections in their program, well that creates read/write connection instead of a read-only one to the primary data file/table involved with that business object. This is only a problem but only when clicking Update in UDF Maintenance.
Using Beth's example of where she's sourced a AR_InvoiceHistoryHeader UDF from AR_TransactonPosting (which is the S/O Sales Journal Update), it will actually instantiate SO_SalesJournal_upd by design. That means if there's a MD override for it and that ON_CREATE block instantiates AR_Customer_bus as an object (as opposed to AR_Customer_svc), this creates a read/write connection to AR_Customer.m4t table/file.
Normally this is not an issue. However, UDF Maint during its update, will at some point want exclusive access to AR_Customer.m4t which it does not have and so you get the "file in use". Had the MD instantiated a service object AR_Custormer_svc instead of business object, it would've create a read-only connection (akin to being in Customer Inquiry) which would not cause the "in use" msg. However, in this example they actually need to write back to AR_Customer during the Sales Journal Update as part of their requirements, so they have to use AR_Customer_bus.
** A solution might be for the MD to not instantiate AR_Customer_bus (or whatever the _bus is) if the StartProgram (as it's called) is CM_UDFMAINT_UI. Sage engineers should give the MDs some official guidance on this too as this issue has been around since Day 1 of Business Framework.
------------------------------
Alnoor Cassim
Accounting Systems, Inc. (ASI)