Friday, November 3

AX 2012 - Different between AOT Table type (Regular , inMemory and Tempdb)

Different between AOT Table type (Regular , inMemory and Tempdb)

1: Regular: The default value. These are permanent tables.

2: InMemory: A temporary table that exists as an indexed sequential access method (ISAM) file.
The ISAM file can exist on either the client tier of the Application Object Server (AOS) tier.
The underlying Microsoft SQL Server has no connection to the ISAM file.
The system does allow you join an InMemory table in the X++ SQL syntax. However, joins and other set operations with InMemory tables are usually inefficient.
An InMemory table is the same thing as what was previously called a temporary table in Microsoft Dynamics AX 2009.


3: Tempdb: A temporary table that resides in the TempDB database of the underlying SQL Server.  The nonstandard format of a TempDB table causes the table to be dropped when it is no longer in use by the current method. Joins and other set operations on TempDB tables can be efficient.

AX 2012 - Returning Positive Next continuous Number Sequence in X++ code

Following below code show how we can get continuous number from the number sequences in Microsoft dynamics ax 2012.



SL_PositionReqNum   positionReqNum;
SysLastValue nextNumSeq;

ttsBegin;
positionReqNum = NumberSeq::newGetNumFromId(NumberSeqReference::findReference(extendedTypeNum(SL_PositionReqNum)).NumberSequenceId).num();
ttsCommit;

return positionReqNum;

AX 2012 - Convert Transdate (mm/dd/yyyy) format to cheque date format in ax 2012

Format the date to fit it in the boxes printed on the check paper like:



         // Date Formating Begins
        //format the date to fit it in the boxes printed on the check paper
        chequeTmp.SL_DateStr   = strFmt('%1', date2str(TransDate, 123, DateDay::Digits2, DateSeparator::None, DateMonth::Digits2, DateSeparator::None, DateYear::Digits4));

        j = strLen(chequeTmp.SL_DateStr);

        for(i = 1; i <= j; i++)
        {
            tempString = tempString + subStr(chequeTmp.SL_DateStr, i, 1);

            if(i != strLen(chequeTmp.SL_DateStr))
            {
                tempString = tempString + "    ";
            }
        }

        chequeTmp.SL_DateStr = tempString;

Popular Posts