Announcements
Hello All,
Getting the below error in NAV 2016 while creating a customer whose credit limit is maintained as 1.
Please suggest.
Thanks in advance.
Microsoft Dynamics NAV
---------------------------
The following C/AL functions are limited during write transactions because one or more tables will be locked. 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 function to save the changes before this call, or structure the code differently.
---------------------------
OK
---------------------------
*This post is locked for comments
Hello,
You can't use runmodal. Try using only RUN.
100% support to what Stefano said, Until and unless a transaction is completed you can not execute a page in the middle of the transaction, if you still want to do so you have to use COMMIT which says you are explicitly completing the transaction before executing the Page.
It seems that you have some custom code that tries to open a page or a report modally in the middle of a transaction. You cannot do that. Check your code with debugger. You can open a page using RunModal only after a commit.
André Arnaud de Cal... 291,359 Super User 2024 Season 2
Martin Dráb 230,370 Most Valuable Professional
nmaenpaa 101,156