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

  • BCC Profile Picture
    18 on at
    RE: Code in Jobs to cancel "Delivered" items on a Sales order

    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

  • Suggested answer
    Zeeshan Adeel Profile Picture
    335 on at
    RE: Code in Jobs to cancel "Delivered" items on a Sales order

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

    try your luck with this code.

    Regards

    zeeshan

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,202 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,923 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans