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

Creating multiple warehouse shipments from a Sales Order

(0) ShareShare
ReportReport
Posted on by 450

So by default on a Sales Order you have the field "Quantity to Ship" and "Quantity Shipped". Now when you would use the action "Create Warehouse Shipment" it would take the amount that's in the "Quantity to Ship" field of all the lines.

Now what i'm trying to achieve is following:

On the Sales Order line, I've added 2 more fields "Quantity to Get" and Quantity Gotten", these basically just stand for items that customers will come and pick up so they don't need to be send out.

Now the idea is when,

"Quantity to Ship" = 10 and "Quantity to Get" = 4 on line 1
and "Quantity to Ship" = 5 and "Quantity to Get" = 2 on line 2

2 warehouse shipments will be created when using the "Create Warehouse Shipment action", one shipment will contain 6 items of item 1 (= 10 - 4) and 3 items of item 2 (= 5 - 2)

the second shipment will contain 4 items of item 1 and 2 items of item 2 (these are basically the quantity to get field values).

As far as i know i should be working in codeunit 80 but i can't seem to find out on how to implement it.

Is there a way to achieve this?

I have the same question (0)
  • Suggested answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    14,284 Super User 2025 Season 2 on at

    It's not codeunit 80. You are trying to create two warehouse shipment, not posting the shipment.

    On page 42 Sales Order there is a function called Create Warehouse Shipment.

    Just call that function twice.

    Update the Qty to Ship from Qty to Get and call the function Create Warehouse Shipment.

    Update the Qty to Ship to the remaining of Qty and call the function Create Warehouse Shipment again.

  • Suggested answer
    InsertX Profile Picture
    450 on at

    Now is there a way to call this function? I've tried using an eventsubscriber of type page::"sales order" with an onbeforeactionevent and next the action 'create warehouse shipment' and tried to call the function before that function is performed so that it's basically done twice but it looks like that is not possible.

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 2,606

#2
YUN ZHU Profile Picture

YUN ZHU 931 Super User 2025 Season 2

#3
Jainam M. Kothari Profile Picture

Jainam M. Kothari 773 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans