Search

Cricket Live scores

AddSeEE

23 February 2017

How to get sales tax and Purch tax percentage in AX 2012

private TaxValue getTaxPercent(TaxGroup _taxGroup, TaxItemGroup _taxItemGroup)
{
    TaxGroupData    taxGroupData ;
    TaxOnItem       taxOnItem;
    TaxData         taxData;

    select firstonly TaxCode from taxGroupData
        index hint TaxGroupIdx
            where taxGroupData.TaxGroup == _taxGroup
            join taxOnItem
            where taxOnItem.TaxItemGroup == _taxItemGroup &&
                    taxOnItem.TaxCode == taxGroupData.TaxCode;

    select firstonly TaxValue from taxData where taxData.TaxCode == taxGroupData.TaxCode;
    return taxData.TaxValue;

}

17 February 2017

AX 2012 RecordInsertList || how to insert set of records in a single database call in AX 2012

RecordInsertList            insertRecords;
SalesTable                     salesTable;

insertRecords           = new RecordInsertList(tableNum(SalesTradeOverEstTmp)); // Define the Table to insert

while select salesTable
{
salesTradeOverEstTmp.salesId = salesTable.salesId;
salesTradeOverEstTmp.CustAccount salesTable.CustAccount;

insertRecords.add(salesTradeOverEstTmp);
}

insertRecords.insertDatabase();

AX 2012 SSRS DP class debugging code || How to debug an RDP class based SSRS report in AX 2012

static void SRSReportDebuggingJob(Args _args)
{
    CeSalesTradeOverEstTmp  salesTradeOverEstTmp; // temp table
    CeSalesTradeOverEstDP   ceSalesTradeOverEstDP = new CeSalesTradeOverEstDP(); //DP class
    CeSalesTradeOverEstContract ceSalesTradeOverEstContract = new CeSalesTradeOverEstContract();// contract class
   
    ceSalesTradeOverEstDP.parmDataContract(ceSalesTradeOverEstContract);
    ceSalesTradeOverEstDP.processReport();
    salesTradeOverEstTmp = ceSalesTradeOverEstDP.getSalesTradeOverEst();
   
    while select salesTradeOverEstTmp
    {
            info(salesTradeOverEstTmp.SalesId);
    }
   
}

01 December 2016

AXBuild for parallel compile | AX 2012 Command prompt compilation | AxBuild.exe for Parallel Compile on AOS of X++ to p-code

AXBuild for parallel compile | AX 2012 Command prompt compilation | AxBuild.exe for Parallel Compile on AOS of X++ to p-code

Open the command prompt using admin rights:

C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\bin>
axbuild.exe xppcompileall /s=01 /altbin="C:\Program Files (x86)\Microsoft Dynamics AX\6.0\Client\Bin"

Please click here for more information

The CIL generator found errors and could not save the new assembly in AX 2012

"The CIL generator found errors and could not save the new assembly"


The following should resolve the problem:
Full compile AX 
Stop the AOS 
Delete all records from the SysXPPAssembly table in SQL (the table is used to contain the assemblies and to share between multiple AOS instances) 
Delete the DLL and netmodule files in your AOS's bin\xppIL directory 
Restart the AOS 
Perform full CIL generation

AX2012