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...
Unanswered

How to create warehouse shipment on releasing sales order?

(0) ShareShare
ReportReport
Posted on by 450

So as the title explains my goal is to automatically create a warehouse shipment when i'm releasing the sales order but there is a slight difference in how it should happen. Normally the amount that it takes from the sales line would be the "to ship quantity". Now the way i want to implement it is: on my sales line i have another field where i can enter a quantity. 

This is where it gets even a bit more complicated:

So picture it like this, on a sales line there is:

Quantity to ship:                  Quantity to get:
10                                        2

(now keep in mind that this is when there is 1 sales line, obviously there could be multiple sales line so that also needs to work as explained below)

Now when i click release when there is a number above 0 in the "quantity to get" field, i basically want to create 2 warehouse shipments:

1 shipment will have an amount of 8 (coming from "quantity to ship" - "quantity to get")

and the other shipment will have an amount of 2 (coming from the "quantity to get")

I've looked for some options but i can't seem to find a direct solution.

In what way would i be able to implement this?

Thanks in advance.

UPDATE:

I've managed to create a warehouse shipment when releasing the document by using following code in the OnAfterAction of Release:

trigger OnAfterAction()
var
     GetSourceDocOutbound: Codeunit "Get Source Doc. Outbound";
begin
     GetSourceDocOutbound.CreateFromSalesOrder(Rec);
     if not Find('=><') then
            Init();
     end;
Now i ofcours still need to make a difference between the "to ship" and "to get" fields
I have the same question (0)

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

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,867 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,153 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans