Announcements
Hi All,
I am calling an action menu item, PurchCancel from my own RunBaseBatch class as follows.
Args args = new Args(); args.record(purchLine.purchTable()); args.parmEnum(NoYes::Yes); args.caller(this); new MenuFunction(menuitemActionStr(PurchCancel), MenuItemType::Action).run(args);
Then I get the following prompt because of the purchCancel.prompt() code in PurchCancel.mainOnServer method.
protected static void mainOnServer(PurchTable _purchTable) { PurchCancel purchCancel = PurchCancel::construct(); purchCancel.parmPurchTable(_purchTable); if (purchCancel.prompt()) { purchCancel.runOperation(); } }
Then if I click OK, I get an error saying that An unbalanced X TTSBEGIN/TTSCOMMIT pair has been detected...
1)how can I avoid this prompt() and 2) also solve this unbalanced X TTSBEGIN/TTSCOMMIT Pair issue?
Thank you.
I guess that you're trying to open the form from inside the database transaction. This is wrong and the system prevents serious consequences by aborting the transaction.
I remember a company whose Axapta 3.0 was completely blocked from time to time. The cause was a dialog opened from a transaction (which wasn't rolled back in this version), which somebody sometimes left open and went for lunch or so. The transaction held a lock on InventSum table, preventing other users to do anything involving inventory...
André Arnaud de Cal...
294,060
Super User 2025 Season 1
Martin Dráb
232,858
Most Valuable Professional
nmaenpaa
101,158
Moderator