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

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

Wierd error coming from standard code when Preview posting a Sales Order

(1) ShareShare
ReportReport
Posted on by 18
I get this below error when trying to preview post a sales order.
 
 
heres the error details in Share details tab.
 
If requesting support, please provide the following details to help troubleshooting:

Error message:
An error occurred and the transaction is stopped. Contact your administrator or partner for further assistance.

The following AL methods are limited during write transactions because one or more tables will be locked: Form.RunModal, Codeunit.Run, Report.RunModal, XmlPort.RunModal.

Form.RunModal is not allowed in write transactions.

Codeunit.Run is allowed in write transactions only if the return value is not used. For example, 'OK := Codeunit.Run()' is not allowed.

Report.RunModal is allowed in write transactions only if 'RequestForm = false'. For example, 'Report.RunModal(...,false)' is allowed.

XmlPort.RunModal is allowed in write transactions only if 'RequestForm = false'. For example, 'XmlPort.RunModal(...,false)' is allowed.

Use the commit method to save the changes before this call, or structure the code differently.

Contact your application developer for further assistance.

Internal session ID:
ee86f2cc-75f8-4c5a-af8e-9d1b09e13674

Application Insights session ID:
e9e2a940-ab7a-4e24-b57f-4732afc133c3

Client activity id:
be9d0b2b-a0c8-c060-c687-03798aeec77f

Time stamp on error:
2024-11-07T16:03:08.8981965Z

User telemetry id:
b9e44427-b61f-4142-b3fd-388ef1c77252

AL call stack:
"Sales-Post (Yes/No)"(CodeUnit 81).OnRunPreview line 13 - Base Application by Microsoft
"Gen. Jnl.-Post Preview"(CodeUnit 19).OnRunPreview(Event) line 2 - Base Application by Microsoft
"Gen. Jnl.-Post Preview"(CodeUnit 19).RunPreview line 4 - Base Application by Microsoft
"Gen. Jnl.-Post Preview"(CodeUnit 19).PreviewStart line 17 - Base Application by Microsoft
"Gen. Jnl.-Post Preview"(CodeUnit 19).Preview line 7 - Base Application by Microsoft
"Sales-Post (Yes/No)"(CodeUnit 81).Preview line 6 - Base Application by Microsoft
"Sales Order"(Page 42).ShowPreview line 4 - Base Application by Microsoft
"Sales Order"(Page 42)."PreviewPosting - OnAction"(Trigger) line 2 - Base Application by Microsoft
 
the error says that they cant use this as below which I highlighted. But it is a standard code.


any help on this?
 
 
I have the same question (0)
  • Suggested answer
    Valentin Castravet Profile Picture
    29,826 Super User 2025 Season 2 on at
    Wierd error coming from standard code when Preview posting a Sales Order
  • Suggested answer
    YUN ZHU Profile Picture
    92,831 Super User 2025 Season 2 on at
    Wierd error coming from standard code when Preview posting a Sales Order
    Uninstall the third-party extension, recreate the Sales Order, and try again. Does the problem still exist?
    I suspect it is a data problem caused by the third-party extension.
     
     
    Hope this helps.
    Thanks.
    ZHU

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

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 4,275

#2
Sumit Singh Profile Picture

Sumit Singh 2,677

#3
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 2,526

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans