Ship and Invoice Sales Order

Home/Ship and Invoice Sales Order

Ship and Invoice Sales Order

You are here:

Objective

In some cases, users of Warehouse Insight will want to be able to invoice documents in addition to shipping when posting.  This article will walk through the steps and code required to Ship and Invoice a Sales Order.

Requirements

This article requires the following:

  • Business Central version 15 or higher
  • Warehouse Insight Advanced WMS version 2.0 or higher

Steps

The following steps/code can be modified or extended as required and assume a base level familiarity with Business Central and Warehouse Insight.

  • Create the Extension

Create an extension codeunit to process the posting and both ship and invoice the document.

In this example, we will override the existing Post event for the Sales Order.  Therefore, we will be subscribing to the “OnBeforeProcessEvent” and listening for event ID “70004”.

Code Snippet 1
Note: Event ID’s can be determined by looking at the Warehouse Insight Events page in Business Central.

The code for Posting the Sales Order is given below.  When done, we have indicated the event was handled and thus prevent further processing by base Warehouse Insight.

Code Snippet 2

Result

Once the extension codeunit has been published when the Post option is chosen on a Sales Order the document will be both Shipped and Invoiced.

Note: The codeunit .al file has been attached to this article for easier reference.
Codeunit 50500 – WHI Sample Extension
Was this article helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Need help?

Leave A Comment

Go to Top