Skip to main content

Notifications

Microsoft Dynamics NAV (Archived)

NAV 2016 C\AL Error

(0) ShareShare
ReportReport
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
---------------------------

*This post is locked for comments

  • 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,162 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

News and Announcements

Announcing Category Subscriptions!

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,359 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans