Skip to main content

Notifications

Business Central forum
Suggested answer

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

Posted on by 14
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?
 
 
Categories:
  • Suggested answer
    Valentin Castravet Profile Picture
    Valentin Castravet 23,639 Super User 2024 Season 2 on at
    Wierd error coming from standard code when Preview posting a Sales Order

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,888 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,247 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans