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

Error when deleting sales order

(0) ShareShare
ReportReport
Posted on by 742

Hi everyone!

I'm working with BC cloud, US version. When trying to delete a sales order, I get this message:

pastedimage1672053828350v1.png

The order does not have any lines created (I can create and delete lines in the form). 

We tried copying the environment to debug (this is a live environment), but this does not happen in the copied environment.

I can delete other sales orders, the issue is with this one. We already tried uninstalling extensions and we still get the message. 

If anyone could help me, I would appreciate it. 

Thank you!

I have the same question (0)
  • Suggested answer
    pankaj.k Profile Picture
    994 on at

    Hi

    Check your code or any  extension if you write any code on page level.

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

    Hi, This looks like a problem caused by customization. And it is difficult to help without the code. You can try to debug.

       

    And if you are not a developer, you can try to find the code detailing the error in the function below.

    pastedimage1672096499616v1.png

    pastedimage1672096569764v2.png

    Hope this helps.

    Thanks.

    ZHU

  • Suggested answer
    DAnny3211 Profile Picture
    11,397 on at

    hi

    share your code pls

    DAniele

  • Valeria Montagut Profile Picture
    742 on at

    We uninstalled extensions and still got the message, so I'm thinking it's not because of a development. If we had anything written on page level, it should not be working without the extension installed.

  • Suggested answer
    Greg Enns Profile Picture
    1,106 on at

    Did you try deleting all the lines first? If not, that's a very good idea as it simplifies the deletion down to 1 record at a time.

    If you've uninstalled all extensions and the error still occurs, then this might be caused by an integration you might have with Dataverse or CRM for example. This is where debugging would help to show what is causing the error.

    Another approach would be to actually post the order. (This is not a recommended approach, but if you're out of options--it might be acceptable to you.) You would just want to zero all lines (or delete them all) and then simply have a meaningless line (like a G/L line) with Qty 1 and $0 amount. That should have no accounting affect--but it could possibly have a sales reporting affect (for example if you measure a customer's Last Sale Date, or # of Orders then that could be affected by this approach)--so be careful.

    You can also involve Microsoft support. If you're on Microsoft SAAS, then you should be able to start a support ticket yourself.

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,105 Moderator on at

    I agree with Greg. Try to delete the salelines first. And if that does not help. You can contact your partner. They should be able to delete the order for you pretty easily by creating a temporary custom code that will delete it.

    Starting a support ticket with Microsoft will have to be done through your partner if that is needed, but the partner should be able to fix this without involving Microsoft.

  • Valeria Montagut Profile Picture
    742 on at

    Hi Inge and Greg,

    Finally, we could delete the order, we had to remove all fields, including customer No, and then (just then) we could delete the order.

    So, I think it's solved by now, but I have no idea why we got that message in first place.

    Thank you for your help!

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,105 Moderator on at

    Sometimes just the strangest things happens that not always can be explained :)

    Glad you got it fixed.

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

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,696 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,512 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans