Thursday, September 29, 2011

Set Prefix in Infolog message

Use below code to set the grouping prefix for the different kind of errors in a single infolog message. 
 
static void TestJob(Args _args)
{
    setPrefix("Main");
    info("Prefix\tInfo1");
    info("Prefix\tInfo2");
    info("Prefix2\tInfo3");
    info("Prefix\tInfo3");
}
 
Regards,
/Ashlesh 

Sunday, September 11, 2011

TFS error while startup AX 2009 clinent after installing VS 2010

If AX 2009 is configured with TFS 2008 and later you have installed VS 2010 on the same system, you will get the below error.

Could not load file or assembly 'Microsoft.TeamFoundation.VersionControl.Client, Version=9.0.0.0,Culture=neutral,PublicKeyToken = b03f5f7f11d50a3a' or one of its dependencies, The system cannot find the file specified.

Follow the steps to resolve this error:
1. Install VS 2008 Team Explorer.
2. Install VS 2008 SP1.
3. Install VS 2008 Team Explorer SP1.

This is because AX uses the 9.0.XXX version of TFS-Client assembly.

Regards,
/Ashlesh

Friday, September 9, 2011

More about AX File extensions


Some notes on AX File extensions :

Most of these files are located in the application folder (AX 2009):
C:\Program Files\Microsoft Dynamics AX\50\Application\Appl\[your_application]
The extensions have 3 characters:
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 extension: Application Label Data files
These files contain the labels and label comments for a specific language of a label file.
ALC extension: Application Label Cache files
These files contain the application label cache. These files can be deleted when the AOS is stopped.
ALI extension: 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 extension: Application Label Temporary files
These files contain new labels before they are committed to the .ald file.
AOI extension: 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 extension: 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 extension: Application Developer Documentation Index files
This is the index to the ADD file.
AHD extension: 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 extension: Application Help Index files
This is the index to the AHD file.
AOD extension: Application Object Data file
This is the ‘AX layer file’, each of these files represents one layer.
KHD extension: Kernel Help Documentation files
These files contain the kernel help documentation you can find in the AOT in the tree node System Documentation.
KHI extension: 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.
Client side (not following the naming logic):
AUC extension: Application Unicode Object Cache file (as from AX 4.0)
This file is created on the client side, and is used to improve performance by caching AX objects. When you are in the situation where an AX client keeps using ‘old code’, or where something works on one client and not on the other, removing the AUC file might be the solution.
You can find this file in the directory C:\Documents and Settings\[USERNAME]\Local Settings\Application Data for xp, or C:\Users\USERNAME\AppData\Local for vista.
AOC extension: Axapta Object Cache file (Untill Axapta 3)
This is the ‘old’ version of the AUC file but serves the same purpose.


Regards,
/Ashlesh

Wednesday, September 7, 2011

Layers in Dynamics Ax

The manner in which layers were used in the old Ax was pretty clear, we had

SYS, SYP Used by the core system
GLS, GLP Used by the initial added modules which were bought in ( CRM from Hands Norway, Product builder from Aston (now Tectura) HRM from Circle Capital, Shop Floor from Thy Data Center ).
LOS, LOP Used by some countries to add functionality ( US EDI connector, Germany Cost Accounting from Circon )
DIS, DIP Used by most countries for localisation
BUS,BUP Used initially by partners freely then only by invitation in an early version of IBI (Industry Builder Initiative)
VAR,VAP Used by the partners to put their code in
CUS,CUP Reserved for the customer
USR,USP Reserved for the customers

/Ashlesh

Moving a whole project from USR layer to BUS layer

If you do not have to pay attention to data in tables (theses will be
deleted in this solution), i think you can do the following:

1. Logon in the Layer where the customisation is made (i.e. USR Layer).
2. Export the whole development project into a .xpo file (without ID's!).
3. Delete the all customisations/objects belongs to the development projekt
in the current layer.
4. Logoff
5. Logon in the Layer where you will move your customisation to (i.e. BUS
Layer).
6. Import the .xpo file (see also step 2).
7. Check that your customisation has no error (compile it) and that it's
working correctly.

But, keep in mind, that all objects get new ID's when you import them into
the new Layer.
As far as i know that cause problems if you have:

1. Data in the tables or fields which are getting new Id's
2. If you build references between between tables over table id and recid.
3. If you use "hardcoded" ID Refernces between object. I.e. if you use a
hardcoded table id insted of tablenum().
Regards,
/Ashlesh