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 :
Supply chain | Supply Chain Management, Commerce
Answered

Cancel Sales Order Event

(0) ShareShare
ReportReport
Posted on by

I need to be able to check if all the sales lines have been canceled.  What's the best event?

Thanks in advance

I have the same question (0)
  • MATTGUO Profile Picture
    22,349 Moderator on at

    Hi Brianmaric,

    Are you using D365 F&O or D365 sales?

    If F&O, the SO should be canceled if all the sales lines have been canceled. And you can also check the line status field on the sales line.

  • brianmaric Profile Picture
    on at

    It's FO

    I'm trying to find the event where I can check if all sales lines have been updated.  I tried fieldvaluemodified and salestable.update()

    But that does not seem to capture the time the salestable status is update to 'cancelled'

  • MATTGUO Profile Picture
    22,349 Moderator on at

    Hi Brianmaric,

    Moved to D365 SCM forum: community.dynamics.com/.../dynamics-365-supply-chain-management-forum

    I try to enable the order event of cancel sales order line, and system displays the cancellation time when i cancel the SO lines.

    pastedimage1591843214026v1.png

    Please have a look this blog for more informaiton: https://community.dynamics.com/ax/b/galynafedorovaaxblog/posts/order-events-in-microsoft-dynamics-365-for-finance-and-operations

  • brianmaric Profile Picture
    on at

    Yes I can to that too.  This is not what I am looking for.  This is a programming question.  I want the code, the programming event for checking if all the lines have been canceled not just one.  I wan to know the event at the sales table level for checking if the whole order has been cancelled...something like salestable.update()

  • Verified answer
    Reyaz@Alfa Profile Picture
    2 on at

    Hi Brianmaric,

    If all lines are cancelled then status of Sales table is also get cancelled, So logic around update method of sales table give you the desired outcomes.. You can use methods updated and updating in salesTableType class

    Please mark as verified if the answer is helpful.

    Regards

    Reyaz  

  • brianmaric Profile Picture
    on at

    Thanks.  That's what I want....sorry for any miscommunication

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 > Supply chain | Supply Chain Management, Commerce

#1
Laurens vd Tang Profile Picture

Laurens vd Tang 301 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 120 Super User 2025 Season 2

#3
Siv Sagar Profile Picture

Siv Sagar 105 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans