web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

The C/AL functions listed below are available during write transactions...

(0) ShareShare
ReportReport
Posted on by 30

Hello guys,

I have noticed a strange behaviour today when posting sales orders.

I was posting as usual and suddenly this message came up:

Fehler2.PNG



Then I confirmed the message with Yes and posted again and then the message did not come up anymore. The sales order was posted.

Now I have posted more sales orders and every now and then the message came up again.

Now I turned on the debugger and waited for the error to come up again and lo and behold, it has a problem with calling up the page from time to time. But I don't understand why it sometimes has a problem and sometimes not.

Fehler1.PNG



The page that usually opens immediately is only there for me to enter the posting date and the document date.


Do you have any idea how I could fix this?

Thank you very much.

I have the same question (0)
  • Suggested answer
    Nitin Verma Profile Picture
    21,708 Moderator on at

    Hi,

    Seems that its your custom code, please put a COMMIT function after Clear function you used.

    pastedimage1659082076745v1.png

  • Maddin Profile Picture
    30 on at

    Hello,

    thank you very much for your suggested solution.

    We have now implemented this in our test system, but find it difficult to import this change into our real system. The background is that we suspect that we might get some inconsistent data after posting if there is an error.

    If an error occurs during the transaction, there is no rollback for the transaction. Any changes made by the transaction are therefore preserved...do you have any idea how we could avoid the commit but still work around the error we get?

  • Suggested answer
    YUN ZHU Profile Picture
    95,593 Super User 2025 Season 2 on at

    Hi, From the error message, it looks like a table is locked. So Nitin's suggestion of adding the Commit method is a bit risky, but it does seem to be a solution.

    I think you need to test it in more detail. If you encounter an order that has gone wrong, you can use the Copy Document method to copy the posted Invoice and retest it. See if the value of a field is causing this.

    Hope this helps as well.

    Thanks.

    ZHU

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,010

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,270 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,085 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans