Techno-Functional Dynamics 365 F&S Data Model Explanations for Reporting, Part 09 Of 25 – Create a Sales Packing Slip

Techno-Functional Dynamics 365 F&S Data Model Explanations for Reporting, Part 09 Of 25 – Create a Sales Packing Slip

Erd blog 9 thumbnail

Things have changed a lot since I started blogging over a decade ago. There are so many wonderful topics to blog and learn on today; it seems like one doesn’t even know where to start. To make the process more friendly, I’ve introduced a new sort of techno-functional blog tutorial. In this series, some very talented developers from my team have contributed their expertise to assist with this content approach to ensure that we keep our quality and quantity high. I hope you all sincerely enjoy the new approaches that we’ve innovated.. And as always, don’t hesitate to reach out to me.. I’m always here to help. — Brandon Ahmad

Create a Sales Packing Slip

There are multiple processes associated with sales order in Dynamics 365 F&S. Previously we learned the functional and technical process behind sales order creation process and picking list creation for sales order in Dynamics 365. In this blog post, we will walk you through the last step of the picking and shipping process of a sales order—create a sales packing slip.

Before we move on to this process, let’s first discuss when this process is steered in the real scenario. It begins from warehouse employees who pick items from the inventory and then prepare them for shipment. After the order is shipped, a packing slip is then sent from the warehouse to post in Dynamics AX for that particular sales order which triggers the order status to be updated.

If you’ve mastered the previous process – picking list creation for sales order then you will find this process easier as it has similar steps. Also in this blog post, you will see step by step techno-functional aspects of this process as you have seen in the previous parts of this series.

Now let’s perform the function.

CREATE A SALES PACKING SLIP in DYNAMICS 365: FUNCTIONAL WALKTHROUGH

Step 1:

First open the Sales Orders and click on ‘Pick and pack’ on the sales order form.

Dynamics 365 Sales Packing Slip-Step 1

 

Step 2:

Click on ‘Post packing slip’ under the ‘GENERATE’ tab.

Dynamics 365 Sales Packing Slip-Step 2

Step 3:

It will bring you to the following display – ‘Packing slip posting’ where you have to click ‘OK’ to post the packing slip.

Dynamics 365 Sales Packing Slip-Step 3

Step 4:

Once you finish posting the packing slip, you will see that the ‘Packing slip’ button is now enabled under ‘JOURNALS’ tab. By clicking the ‘Packing slip’, you can view your recently posted packing slip.

CREATE A SALES PACKING SLIP IN DYNAMICS 365: TECHNICAL WALKTHROUGH

Let’s continue with the technical walkthrough of this process. There are 2 primary tables involved in this process, “CustPackingSlipJour” and “CustPackingSlipTrans”.

If you are a developer wishing to learn more, it may be wise to check out our Boot Camp, which takes you from zero to hero with some serious hands-on lab action.

Dynamics 365 training courses

ENTITY RELATIONSHIP DIAGRAM (ERD) TO CREATE A SALES PACKING SLIP IN DYNAMICS 365:

For a deeper understanding of the functionality of the packing slip process, look at the following Entity Relationship Diagram (ERD) which shows all the cardinality constraints relationship among the tables.

Dynamics 365 Sales Packing Slip-Entity Relationship Diagram-ERD

Here is the Runnable class(job), which will post the packing slip of a sales order.

class ibPostPackingSlip 
{         
    /// <summary> 
    /// Runs the class with the specified arguments. 
    /// </summary> 
    /// <param name = "_args">The specified arguments.</param> 

    public static void main(Args _args) 
    { 
        SalesFormLetter salesFormLetter; 
        SalesTable salesTable; 
        SalesId salesId = '001135'; // replace ‘001135’ your sales order 
        CustPackingSlipJour custPackingSlipJour; 
        ttsBegin; 
        salesTable = SalesTable::find(salesId); 
        if (salesTable && salesTable.SalesStatus == SalesStatus::Backorder) 
        { 
            salesFormLetter = SalesFormLetter::construct(DocumentStatus::PackingSlip); 
            salesFormLetter.update(salesTable,systemDateGet(),SalesUpdate::PackingSlip,AccountOrder::None,NoYes::No, NoYes::No, NoYes::No);
            if (salesFormLetter.parmJournalRecord().TableId == tableNum(custPackingSlipJour)) 
            { 
                custPackingSlipJour = salesFormLetter.parmJournalRecord(); 
                info(strFmt('Packing Slip :%1 successfully created for Sales Order :%2', custPackingSlipJour.PackingSlipId, custPackingSlipJour.SalesId)); 
            } 
        } 
        else 
        {
            info(strFmt('%1 does not exsists in the system !', salesId)); 
        } 
        ttscommit; 
    } 
} 

CustPackingSlipJour

The CustPackingSlipJour table contains the posted sales packing slip headers that originate from sales orders. Let’s look at what other functions this table can perform:

  • helpful in retrieving posted sales order header lines information that contains all the shipment and delivery details.
  • contains confirmed sales order header details which are very useful in reporting and queried.
  • carries the information regarding bill of lading which is the formal contract between the seller and the shipping company (carrier) to transport the goods to customer.

Now we will go through some important fields of the CustPackingSlipJour with a few technical details.

FieldData TypeDescription
PackingSlipIdstringPacking Slip id of packing slip journal that originates from sales order
SalesIdstringSales Order id of packing slip journal
DeliveryDatedateShipment date for sales order
DeliveryPostalAddressint64the reference of delivery postal address for sales or quantity details of deduced and on ordered items
DlvTermstringthe delivery term for sales order
InvoiceAccountstringInvoice account for sales order
InvoicePostalAddressint64the reference of delivery postal address for invoicing
BillOfLadingIdstringBill of lading id for sales order packing slip

CustPackingSlipTrans

The CustPackingSlipTrans table contains the posted sales packing slip lines that originate from sales order lines. It also contains:

  • the information about quantity details of deduced and on ordered items, sales price, and amount of each sales lines of sales order.
  • the information of shipment and delivery of products which are used in warehouse like LicensePlates, Barcodes, off and on shells products.

Here are some important fields of the CustPackingSlipTrans with a few technical details.

FieldData TypeDescription
PackingSlipIdstringPacking Slip id of packing slip journal that originates from sales order
ItemIdstringstores the Item id
InventDimIdstringstores the InventDim
DeliveryDatedateShipment date for sales order
Orderedrealcontains the Order quantity
Qtyrealstores the delivered quantity
PdsCWQtyrealcontains the catchweight product quantity
Remainrealcontains the remaining quantity

Summary

In this post, we

  • functionally introduced the Sales Order packing slip posting process.
  • learned the process for posting the packing slip of sales orders in Dynamics 365 F&S.
  • saw the runnable code that posts the packing slip.
  • examined the technical data model and table fields behind posting a packing slip of a sales order.
  • explored the main tables involved in posting the packing slip of a sales order in Dynamics 365 Finance and Operations.

We sincerely hope that you enjoyed part 9 of our exciting series on the Dynamics 365 data model. We aim to provide quality service at all times.  And as always, if you need to reach me, you know how to get in touch by reaching out to me here.  — Brandon Ahmad, founder of InstructorBrandon and Dynatuners.

 

Leave a Reply

Your email address will not be published. Required fields are marked *