Skip to main content

Posts

(will work 100%) Delete_From not working with changeCompany keyword in Axapta

  If you are facing issue that Delete_From not working with changeCompany keyword in Axapta then you can assign null to table object before delete_from line. It will work 100%      changecompany(dataArea.Id)       { tableobject=null;  delete_from tableobject where condition; }
Recent posts

Visual Studio Exit issue during SSRS Report deployment to AX

 if you are getting below error at Visual Studio Exit issue during SSRS Report deployment to AX.  Faulting application name: devenv.exe, version: 12.0.31101.0, time stamp: 0x54548724 Faulting module name: ntdll.dll, version: 6.3.9600.18233, time stamp: 0x56bb4e1d Exception code: 0xc0000374 Fault offset: 0x000e6054 Faulting process id: 0x9b8 Faulting application start time: 0x01d21d6238454bc0 Faulting application path: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe Faulting module path: C:\Windows\SYSTEM32\ntdll.dll Report Id: f10f130f-8955-11e6-80cf-005056bf7b8c Faulting package full name:  Faulting package-relative application ID:  Solution 1)Open your System Properties. (Right-click start menu, select System, then Advanced System Settings) 2) Click the Advanced tab 3) Click the Environment Variables button 4) Under the System Variables block, add the following value:        a.  Variable name = COMPLUS_LoaderOptimization        b.  Variable value = 1 After

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();           // This method will update the inventory transactions         InventMovement::bufferSetRemainQty(SalesLine);     } }

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         {             exceptionTextFallThrough();         }                 ssrsReportConceptNode = reportIterator.next();     }

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));