Notifications
Announcements
No record found.
Hi All,
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".
Please help how it could be achieved.
Thanks
Somesh
Hi Somesh Kumar Dubey,
Have you read the old thread?
community.dynamics.com/.../print-custom-report-after-product-receipt-post-successful-not-working
You can try to use COC to extend the isPrinting() method to make it always return true.
Hi Will
Thanks for response, can you please tell me how I can extend isPrinting() method and when do I need to call it excalty?
Hi,
When you say, 'print my custom report alone' how are you calling the report? Can you share your existing code? Are you trying to run it in batch? The error typically comes when you are trying to open UI element(example dialog) in batch mode.
Hi Somesh,
Try the following codes:
[ExtensionOf(classStr(PurchFormLetterContract))] final class PurchFormLetterContract_Extension { public boolean isPrinting() { next isPrinting(); return true; } }
Hi Will,
Thanks this is working as expected.
I have a one more custom report to print after customer payment journal posting. But if I want to print my custom report, then there is same error : "Stack trace: Cannot run form on non interactive session".
Hi Martin,
Since you have locked my thread, Please help me with the customer journal posting report.
Hi Somesh Dubey,
What problem are you encountering now, is it the same problem as your original thread? have you solved the issue?
I have one more custom report (CustomerPaymentJournalCopy) to print after customer payment journal posting. But if I want to print my custom report, then there is same error : Cannot run form on non interactive session".
Thanks in advance.
Have you read this thread??
community.dynamics.com/.../stack-trace-cannot-run-form-on-non-interactive-session-while-running-custom-report-at-the-time-of-customer-payment-journal-posting
Please try with below code on CoC.
[ExtensionOf(formControlStr(LedgerJournalTransCustPaym, PostJournal))]
final class LedgerJournalTransCustPaym_TRIForm_Extension
{
public void clicked()
MenuFunction menuFunction;
Args args;
Tri_CashReportReportClass controller;
CustPaymentJournalContract dataContract;
LedgerJournalTrans ledgerJournalTrans = this.dataSourceObject().cursor();
next clicked();
args = new Args();
args.record(ledgerJournalTrans);
menuFunction = new MenuFunction(menuItemOutputStr(TRICashReceiptReport), MenuItemType::Output);
menuFunction.run(args);
}
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 664 Most Valuable Professional
André Arnaud de Cal... 522 Super User 2025 Season 2
Sohaib Cheema 303 User Group Leader