Skip to main content

Notifications

Microsoft Dynamics NAV forum
Suggested answer

NAV 2016 C\AL Error

Posted on by

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

  • Vojkan Profile Picture
    Vojkan 65 on at
    RE: NAV 2016 C\AL Error

    Hello,

    You can't use runmodal. Try using only RUN.

  • Suggested answer
    RockwithNav Profile Picture
    RockwithNav 6,562 on at
    RE: NAV 2016 C\AL Error

    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.

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,160 Most Valuable Professional on at
    RE: NAV 2016 C\AL Error

    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.

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 228,469 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans