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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Code in Jobs to cancel "Delivered" items on a Sales order

(0) ShareShare
ReportReport
Posted on by 18

Hello

AX2012 R3

Does anyone have a code to cancel "Delivered" items on a Sales order?

I know you can take line by line via "Update line" -> Deliver remainder " and then turn the quantity to negative quantity  and generate a Packing slip, but I would like a faster way to cancel affected items.

For example, if someone has a perfect code for it in "jobs" so you can take row by row or article by article there or even all delivered items on a Sales order and cancel by one click there.

// regards BCC

I have the same question (0)
  • Suggested answer
    Zeeshan Adeel Profile Picture
    335 on at

        {
    
            salestable = salestable::find("F898-000460");
    
            SalesUpdateRemain::cancelRemainderOnOpenSalesLines(salestable);
    
        }

    try your luck with this code.

    Regards

    zeeshan

  • BCC Profile Picture
    18 on at

    Hello

    Thanks for the try, but I tested it with some different variants and unfortunately it didn´t work.

    Something in the code seems to be missing.

    / regards BCC

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 592 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 305 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans