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.