Create an Intercompany sales order using X++ code in AX 2012

public void interCompanySO(Args _args)
{

    SalesTable  salesTable,salesTableLocal;
    salesTableLocal= args.record();

    salesTable= SalesTable::findRecId(salesTableLocal.RecId, true);

    ttsBegin;
    if (salesTable.SalesType == SalesType::Journal)
    {
        salesTable.SalesType = SalesType::Sales;
        salesTable.Update();
    }
    ttsCommit;

    // code to create a intercompany Sales Order  and purchase order.
    TradeInterCompany::autoCreateOrder(salesTable);

}

No comments:

Post a Comment

D365 F&O Release Pipeline Step by Step Configuration Without ISV's

  Step-by-Step Guide: Creating D365FO Build and Deploy Pipelines Azure DevOps Build Pipeline I will walk through the standard procedures...