https://community.dynamics.com/ax/f/microsoft-dynamics-ax-forum/257167/cannot-run-form-on-non-interactive-session
Similar to the post above, I have a custom report to print after product receipt is posted OK, there is a parameter to enable printing, if I printed together with the product receipt, it is printed OK. But if I want to print my custom report alone, then there is error : "Stack trace: Cannot run form on non interactive session"
my code extension is PurchPackingSlipJournalPrint after printLabels() method.
I wonder if I can have other place to call my custom report ? Or what should I do to change the non interactive session ?
this is PurchPackingSlipJournalPrint
Args args = new Args();
MenuFunction menuFunction;
args.caller(this);
args.record(_record);
menuFunction = new MenuFunction(menuitemOutputStr(CustomReport), MenuItemType::Output);
if (menuFunction && menuFunction.checkAccessRights())
{
menuFunction.run(args);
}