Wednesday, April 4, 2012

searching tools fileseek

I would like to share a very good searching tool (fileseek) that I am using for search the data in my Dynamics AX enlistment, you can find more detail using the link This tool can be used a replacement of the cross reference functionality in AX, but you should have the enlistment for that particular branch

some Dynamics Axapta FAQs

1 . Breakpoint in clicked method
There is quite well known bug in AX that breakpoint placed in the clicked() method of a button will not be triggered. It is quite unpleasant one since when one faces it first time he gets totally confused. However, there are easy workarounds for this bug. First one – put breakpoint into the method that is called from clicked (in most cases it is possible). But if not, keyword breakpoint can be used – it will be triggered in clicked() method.

2. Global::isType
The easiest way to determine if an EDT extends another EDT (not necessarily directly) is to use Global::isType() method.

For example:
isType(extendedtypenum(PurchUnit), extendedtypenum(UnitIDBase));
give true, since PurchUnit extends UnitID, which extends UnitIDBase.
isType(extendedtypenum(ABCModelType), extendedtypenum(NoYesId));
gives false, since ABCModelType and NoYesId are in different hierarchies.

3. Delete actions and multiple relations
If one table has several relations to another table delete action will not work properly. In such case delete action will be triggered for only one of the relations. So, in the case of multiple relations one should write his own cascading or restricting logic in the delete method. An example can be found in Unit and UnitConvert tables. UnitConvert table has two relations to the Unit table – from unit and to unit. Table Unit has cascading delete action for the UnitConvert table. However, if a unit will be deleted, only unit conversions with from unit equal to the deleted one will be deleted. Conversions with to unit equal to the deleted one will survive. Example of correct implementation can be found in InventTestEmplResponsible and EmplTable. EmplTable has delete method overridden to perform manual delete in the InventTestEmplResponsible table.

SSAS – OLAP – SSRS Report using OLAP

I have created a presentation regarding the SSAS and OLAP in Dynamics AX

·       SSAS
o   OLAP
§  Cube
·       Measure
·       Dimensions
§  Perspective
o   BIDS
o   MDX Queries
o   Reports
§  KPI
§  Miscellaneous

Feel free to contact me for any questions.

Tuesday, February 7, 2012

default index for a table in AX / X++

Question: What is the default index for a table ?

Microsoft Dynamics AX requires a unique index on each table. If there are no indexes on a table or all the indexes are disabled, a system index is automatically created. The system index is created on the RecId and DataAreaId fields if the DataAreaId field exists. Otherwise, the system index is created on the RecId field. You can see system indexes in the database, but they aren't visible in the AOT.

get values of base enums using code in x++

Question: How to get  values of base enums using code in x++

static void getEnumValues(Args _args)
    EnumId   enumId   = enumNum(LedgerDimensionType);
    DictEnum dictEnum = new DictEnum(enumId);
    int      count  = dictEnum.values();
    int      counter 

    for(counter = 0; counter < count; counter ++)
        // You can use the number of method exposed by DictEnum class
// dictEnum.index2Value(counter)
// dictEnum.index2Symbol(counter)             
// dictEnum.index2Label(counter)

List in X++ / Dynamics AX

List is a type of data structure and collections, it can contain unlimited items, in x++, list can be created of several Types(specified in the Types base enum), the type must be specified on the declaration and it cannot be changed after the initialization.

There are some classes exists to enumerated and iterate the list object. ListIterator object has methods that can insert and deleted items from list,  ListEnumeration cannot modify the list content


    List           myList       = new List(Types::Integer);
    List           myListString = new List(Types::String);
    ListIterator   literator  

    // add the element at the end of the list

    // add the element at the start of the list


    myListString.addEnd ("Second");

    myListString.addStart ("First"); 

    // If you want to insert the data at some specific index, then you need to make use of the listIterator class 

    // Iterator performs a midpoint 

    // insert at current position.

    literator = new ListIterator(myListString);

    while (literator.more())
        // can provide some condition, i.e. if check etc
        if (literator.value() == "First")
            listIterator.insert ("Between first and second");