September 07, 2013

Axapta Application file extensions

Dynamics Ax Application file extensions

In Axapta we found a lot of file extensions are used. Each and every extension have a logical name, so you can easily identify their purpose. The extensions have 3 characters.

Most of these files are located in the application folder (AX 2009):
C:\Program Files\Microsoft Dynamics AX\50\Application\Appl\[your_application]




The first character indicates the owner of the file:


a: application
k: kernel

The second character indicates the content of the file:
l: label
o: object
t: text
d: developer documentation
h: help

And the third character indicates the type of file:
d: data
i: index
c: cache
t: temporary


Using this logic, we can easily name all file extensions, and understand their purpose.

In the application folder:
ALD : Application Label Data files
These files contain the labels and label comments for a specific language of a label file.


ALC : Application Label Cache files
These files contain the application label cache. These files can be deleted when the AOS is stopped.


ALI : Application Label Index files
The .ali files contain an index to the .ald files. These files can be deleted when the AOS is stopped.


ALT : Application Label Temporary files
These files contain new labels before they are committed to the .ald file.


AOI : Application Object Index file
The AOI file contains an index to the AOD files. You can delete this file when the AOS is stopped. Be sure to delete this when you have copied layers from one AX installation to an other.


ADD : Application Developer Documentation Data files
These files contain the documentation that is found under the Application Developer Documentation node. These files are localized, just like label files.


ADI : Application Developer Documentation Index files
This is the index to the ADD file.


AHD : Application Help Data files
The AHD file contains the documentation aimed at the end user. In the AOT, this is found in the “Application Documentation” node
.

AHI : Application Help Index files
This is the index to the AHD file.


AOD : Application Object Data file
This is the ‘AX layer file’, each of these files represents one layer.


KHD : Kernel Help Documentation files
These files contain the kernel help documentation you can find in the AOT in the tree node System Documentation.


KHI : Kernel Help Index files
The KHI file is the index to the Kernel Help file.


Located in Server/bin:

KTD extension: Kernel Text Data file
This file contains system text strings. These are used in the interface of AX and for system messages.


KTI extension: Kernel Text Index file
This is the index to the KTD file.


-Harry

September 06, 2013

Join Two Tables at Run Time

Join Two Tables at Run Time

static void theAxapta_JoinTables(Args _args)
{
    Query                     query;
    QueryBuildDataSource      queryBuildDataSource1,
                              queryBuildDataSource2;
    QueryBuildRange           queryBuildRange;
    QueryBuildLink            queryBuildLink;
    ;
    // Create a new query object
    query = new Query();
    // Add the first data source to the query
    queryBuildDataSource1 = query.addDataSource(tablenum(CarTable));
    // Add the range to this first data source
    queryBuildRange = queryBuildDataSource1.addRange(fieldnum(CarTable, ModelYear));
    // Add the second datasource to the first data source
    queryBuildDataSource2 =   queryBuildDataSource1.addDataSource(tablen
    um(RentalTable));
    // Add the link from the child data source to the
    //parent data
    source
    queryBuildLink = queryBuildDataSource2.addLink(fieldnum(CarTable,
    CarId),fieldnum(RentalTable, CarId));
}

Note:
This process (query through X++ code) is very similar to create a query directly through AOT node.
AOT -> Query -> Right Click -> New Query
I would suggest first create a query through query node, than go for this code.


-Harry