web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Unanswered

Posting Stack trace: Cannot run form on non interactive session.

(0) ShareShare
ReportReport
Posted on by 5

Hi,

I have tried the solution 1 and 2 both mentioned in the article blogspot. But getting the following error:

Posting Posting Sales order: SON0122716 Company: ABC Inc Posting Purchase order: PON0116298 Company: ABC Inc Posting Stack trace: Cannot run form on non interactive session.

Please I will be really thankful if someone can help me with it.

Regards,

Umair 

I have the same question (0)
  • huijij Profile Picture
    19,811 on at

    Hi umairsaeed,

    Can you change a Posting Sales order to test it?I tried solution 2 and the result does not report such error.

  • umairsaeed Profile Picture
    5 on at

    I tried it on multiple orders.

    When I put the same code in the job and run it then it works perfectly fine.

    However, When we put that same code into the service method and call that service from Postman then it returns the "Purchase order: PON0116298 Company: ABC Inc Posting Stack trace: Cannot run form on non interactive session." error.

  • umairsaeed Profile Picture
    5 on at

    pastedimage1630664673620v1.png

  • Martin Dráb Profile Picture
    235,243 Most Valuable Professional on at

    Can you please show your code and tell us which line is throwing the error?

    I suspect that your code is trying to open the posting dialog, but I can't be sure unless I get more information from you.

  • umairsaeed Profile Picture
    5 on at

    I am using the following code

     salesTable = SalesTable::find(comAxSalesOrderMapping.AXSalesId, true);
    
                salesFormLetter =  SalesFormLetter::construct(DocumentStatus::PackingSlip);
                salesFormLetter.update(salesTable, SystemDateGet(),SalesUpdate::All, AccountOrder::None, false, false);

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.

Helpful resources

News and Announcements

[Smoke test 2510.1]

Quick Links

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Supply chain | Supply Chain Management, Commerce

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans