Wednesday, June 15, 2011

Tips & Tricks - Number Sequence


When you are using a Number Sequence, keep in mind that a Continuous Number Sequence is slower than a non-continuous. The reason is that the system creates a record in the table NumberSequenceList (with the status Active) and cleans it up later during TTSCOMMIT.
Performance tip: You can improve the performance of a process that creates many numbers of one Number Sequence by using number pre-allocation. This loads a set of numbers into the memory and provides faster access. You can do this by using the NumberSeqGlobal, witch means that once it is instantiated, it is available until the session is closed. This function is only available for non-continuous Number Sequences. The numbers can only be retrieved from the cache by calling the getNumInternal() method in the NumberSeq_Fast class.

List of mandatory fields on a table

Hi,
   The Following Code will let you know the List of Mandatory Fields in a table :-


static void CheckMandatoryFieldsOnTable(Args _args)
{
    DictTable dictTable;
    DictField dictField;
    int i;
    TableId tableId = tablenum(custtable);
    ;
    dictTable = new DictTable(tableId);
    for (i=1 ; i<=dictTable.fieldCnt() ; i++)
    {
        dictField = new DictField(tableId, dictTable.fieldCnt2Id(i));
        if (dictField.mandatory())
        {
            info(dictField.name());
        }
    }
}

Enjoy DAX !!!

AX 2012 Unleashed


On Amazon.com I found the first paperback concerning Ax 2012 ‘Microsoft Dynamics Ax 2012 Unleashed’. The book will be released Ocober/November this year. There is not much info availible at the moment, but if you’re intrested in pre-ordering go to Amazon.com
Details:
Author:David Weiner, Ivan Cole
Format:Paperback
Publish Date:October 2011
ISBN-10:0672335484
ISBN-13:9780672335488
Edition:1st


Cheers !!!