Thursday, July 16, 2020

Sales Order Picking,Packing,Invoice in ax 2012 using x++

Hi guys, Today we discuss Sales order Picking,Packing,Invoice in ax 2012 using X++.



Packing code:

    SalesFormletter SalesFormletter;
    SalesTable        salesTableLoc;


    salesTableLoc=SalesTable::find(DaxSalesInformation.SalesId);
    if (salesTable.RecId)
    {
     salesFormLetter=SalesFormLetter::construct(DocumentStatus::PackingSlip);
            salesFormLetter.update(salesTableLoc);
            salesFormLetter.update(salesTableLoc,systemDateGet(),SalesUpdate::All,AccountOrder::None, NoYes::No,NoYes::Yes);
            info("Sales Order Status is Delivered");

Invoice code:

    SalesFormletter SalesFormletter;
    SalesTable        salesTableLoc1;

    salesTableLoc1=SalesTable::find(DaxSalesInformation.SalesId);
    if (salesTableLoc1.RecId)
    {
        salesFormLetter=SalesFormLetter::construct(DocumentStatus::Invoice);
        salesFormLetter.update(salesTableLoc1);
        info(strFmt("%1 Sales Order Posted and Final Status is Invoiced",salesTableLoc1.SalesId));

Keep Daxing !!


If we want to add any field on sales order process.For that field we get the values from below methods.

SalesTable--initFromCustTableIL()-->initFromCustTableServer()-->called from 
SalesLine
SalesParmTable---initFromSalesTable()
SalesParmLine---initFromSalesLine()

CustConfirmJour---initFromSalesTable()
CustConfirmTrans--initFromSalesLine()


No comments:

Post a Comment