SBX - Search With Button

SBX - Forum Post Title

NAV 2016 C\AL Error

Microsoft Dynamics NAV Forum

Aditi v y asked a question on 6 Dec 2018 12:12 AM

Question Status

Suggested Answer

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
---------------------------

Reply
Suggested Answer

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.

Reply
RockWith NAV responded on 6 Dec 2018 4:00 AM
My Badges
Suggested Answer

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.

Reply
Suggested Answer

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.

Reply
RockWith NAV responded on 6 Dec 2018 4:00 AM
My Badges
Suggested Answer

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.

Reply

SBX - Two Col Forum

SBX - Migrated JS