Skip to main content

Posts

Cancel Deliver Remainder through X++ (Sales Order ) DAX

 To Cancel Deliver Remainder through X++ you can use below code sample. Thanks. static void _CancelDeliverRemainder_Sales(Args _args) {     SalesLine SalesLine = SalesLine::find('SO0013', true);     ;           if (SalesLine)     {         // Set remaining inventory Qty to zero         SalesLine.RemainInventPhysical  = 0;           // Set remaining physical Qty to zero         SalesLine.RemainSalesPhysical   = 0;                                   // We have to cancel the SalesLine                  SalesLine.PurchStatus           = PurchStatus::Canceled;                    SalesLine.update();         ...

Deploy SSRS Report by x++ job in Ax 2012

To deploy SSRS Report by x++ job in Ax 2012  you can try below job in AOT,  #AOT        TreeNodeIterator        reportIterator = TreeNode::findNode(#SSRSReportsPath).AOTiterator();     SRSReportManager        srsReportManager = new SRSReportManager();     SSRSReportConceptNode   ssrsReportConceptNode;         if (!reportIterator)         return;         ssrsReportConceptNode = reportIterator.next();     while (ssrsReportConceptNode)     {         try         {             srsReportManager.deploymentStart();             srsReportManager.deployReport(ssrsReportConceptNode);             srsReportManager.deploymentEnd();         }         catch ...

Get tax value from Journal Trans form in Axapta

   info(strFmt("%1 Tax amount",LedgerJournalEngine.getShowTax(_ledgerJournalTrans).calcTax()));     info(strFmt("%1 Tax value",ledgerJournalEngine.correctedTaxAmount(_ledgerJournalTrans))); If journal posted line abs(Tax::taxAmountCorrectedPerLine(_ledgerJournalTrans.Voucher,                                                               _ledgerJournalTrans.TransDate,                                                               _ledgerJournalTrans.RecId)); if Journal not posted line tax value abs(ledgerJournalEngine.correctedTaxAmount(_ledgerJournalTrans));

X++ Code to generate Transfer order Picking list in Axapta

 void TO_PickList(InventTransferId transferId) { InventTransferParmTable InventTransferParmTable_1; InventTransferUpdPick InventTransferUpdPick; ; InventTransferParmTable_1.clear(); InventTransferParmTable_1.initParmDefault(); InventTransferParmTable_1.ParmId = RunBaseMultiParm::getSysParmId(); InventTransferParmTable_1.TransferId = transferId; InventTransferParmTable_1.UpdateType = InventTransferUpdateType::PickingList; InventTransferParmTable_1.PrintTransferPickingList = NoYes::No; InventTransferParmTable_1.PickUpdateQty = InventTransferPickUpdateQty::All; InventTransferParmTable_1.EditLines = NoYes::Yes; InventTransferParmTable_1.ExplodeLines = NoYes::Yes; InventTransferUpdPick = InventTransferUpdPick::newParmBuffer(InventTransferParmTable_1); InventTransferUpdPick.run(); }

X++ code to receive Transfer Order In Axapta

   code to receive Transfer Order In Axapta as below. void TO_PReceive(inventTransferId transferId) { InventTransferParmTable InventTransferParmTable_1; InventTransferUpdReceive InventTransferUpdReceive_1; ; InventTransferParmTable_1.clear(); InventTransferParmTable_1.initParmDefault(); InventTransferParmTable_1.ParmId = RunBaseMultiParm::getSysParmId(); InventTransferParmTable_1.TransferId = transferId; InventTransferParmTable_1.UpdateType = InventTransferUpdateType::Receive; InventTransferParmTable_1.PrintTransferReceipt = NoYes::No; InventTransferParmTable_1.ReceiveUpdateQty = InventTransferReceiveUpdateQty::All; InventTransferParmTable_1.EditLines = NoYes::Yes; InventTransferParmTable_1.ExplodeLines = NoYes::Yes; InventTransferUpdReceive_1 = InventTransferUpdReceive::newParmBuffer(InventTransferParmTable_1); InventTransferUpdReceive_1.run(); }

X++ code to Ship Transfer Order in Ax 2012

To Ship Transfer Order in Ax 2012 you can use below sample code..Thanks. void TO_Shipment(inventTransferId transferId) { InventTransferParmTable inventTransferParmTable; InventTransferUpdShip inventTransferUpdShip; ; inventTransferParmTable.clear(); inventTransferParmTable.initParmDefault(); inventTransferParmTable.ParmId = RunBaseMultiParm::getSysParmId(); inventTransferParmTable.TransferId = transferId; inventTransferParmTable.UpdateType = InventTransferUpdateType::Shipment; inventTransferParmTable.PrintTransferReceipt = NoYes::No; inventTransferParmTable.ShipUpdateQty = InventTransferShipUpdateQty::All; inventTransferParmTable.EditLines = NoYes::Yes; inventTransferParmTable.ExplodeLines = NoYes::No; inventTransferParmTable.InventDimFixedReceiveList = 0; inventTransferUpdShip = InventTransferUpdShip::newParmBuffer(inventTransferParmTable); inventTransferUpdShip.run(); }