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?