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
---------------------------
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.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,524 Super User 2024 Season 2
Martin Dráb 228,469 Most Valuable Professional
nmaenpaa 101,148