Saturday, August 27, 2016

Cross-reference create is taking long time but not completed (Never ending)

I tried to update the cross-reference, but the cross-reference update progress is not completed. It is only showing that it is in progress.

To create/update the cross-reference, in the development workspace, open the Tools menu, and then click Cross-reference > Periodic > Update

I have referred into this link to solve this issue. But, I couldn’t complete a single step. Because, the cross-reference update is not completed.

After that, I have noticed that the cross-reference progress dialog box is not showing the proper status. When the cross-reference is updating, in the progress window, we could able to find that which object is in progress.

I have checked that the following cross-reference table’s rows count from SQL Server Management Studio. The table rows are inserted.

So, this is a problem.

The cross-reference update is running based on the batch job. When we call the cross-reference update, it will create a batch job and starting that batch job. If the batch is not updating or showing waiting status not showing the executing status then cross-reference progress box won’t show any updated message. Simply it will display the update animation never complete.

The problem is that incremental CIL have some issue. I cleared the XppIL folder files, full CIL and did the incremental CIL. Incremental CIL is running successful.

I again started the cross-reference update process. It worked fine.

If the batch job is working fine, then the cross-reference will work.

Note: The cross-reference may take long time based on the server performance at first time.

Cross-reference tool

Introduction to cross-reference tool:

Cross-reference tool is one of the Microsoft Dynamics AX IDE. It is used to find the relationships between the objects. If you want to know what are the objects are used in a particular class or what are the objects are using a particular class, you can use cross-reference tool.
For example:
I have one output menu item, but I don’t know where this menu item is used. I need to find the menus for the particular menu item. So, the solution is that I have to look all module menus manually. Instead of finding manually, we can use cross-reference tool.

To find the menus for the particular menu item:

Right click on the menu item > Add-Ins > Cross-reference - > used by
It will give you the list of objects that are using this menu item. In the result window, you can find the menus object also.

If you click using option, it will give you the list of objects used in the selected menu item. It may give you the form of the selected output menu item.

Cross-reference results are coming from the following tables.


To create/update the cross-reference

By default, cross-reference don’t have data. To create the cross-references you need to configure manually by navigating to, in the development workspace, open the Tools menu, and then click Cross-reference > Periodic > Update. The Update cross-reference window appears. Select update all and click OK button. It will create a batch job and start running the batch job.

After completed the cross-reference update, if you create a new object in AOT, that created object reference won’t be updated automatically in cross-reference. We need to do manually by right click on the object > Add-Ins > Cross-reference > Update. You need to do the same job again after you modified the object.

Automatic cross-reference update

Instead of doing this manually, we can set automatic process when the compiler compile the objects. To set this option, development workspace > Tools > Option > Development > click compiler button > check cross-reference checkbox and click OK button.

It will affect your performance, because it will run whenever compiler compiles the objects. If you don’t want immediate update, you can go for the scheduling process for every week or end of the day or etc. Refer into this link for cross-reference scheduling

For more information, please refer

Thursday, August 18, 2016

Cannot create a record in SysXppAssembly (SysXppAssembly). The record already exists.

I have done some changes in one class. That class is running on the server side. It is related to the service operations. The attribute SysEntryPointAttribute is used in that class method for decorate. This class is used for batch job process. The problem is that my changes are not reflecting.

The solution for this issue is that we need to do the incremental CIL. So, I tried the incremental CIL. But, I got one error message “Cannot create a record in SysXppAssembly (SysXppAssembly). The record already exists.”

I thought AOS restart will solve this issue, but not worked.

So, I did the following steps. It worked.

  1. Stop the AOS
  2. Navigate to the XppIL folder in your AOS server “C:\Program Files\Microsoft Dynamics AX\60\Server\YourAXInstanceName\bin\XppIL”
  3. Backup the files from the XppIL folder.
  4. Delete the files from the XppIL folder. Note: files only not sub folders.
  5. Restart the AOS
  6. The XppIL folder files will be created after the AOS restart

I tried the incremental CIL, Incremental CIL is completed successfully.

Whenever we created/modified the class that is used for batch job process, we need to do the incremental CIL.

Thursday, August 11, 2016

Recreate development environment from stage environment

When we install AX hotfix, first we need to install in development. Once it is installed and tested successfully then we can move to stage and everything is fine in stage then we can move to production by using model store deployment. This is the best practices suggested by Microsoft.
But, sometimes the hot fixes are installed directly on stage and production not in development then we will face objects version issue. If mismatch hotfix between stage and development is only one, we can install hotfix directly in development. But, if it is more than, we need to install one by one.

Instead of installing missing hotfixes one by one, we can recreate the development environment from stage environment by using two methods.
  1. Model store move
  2. Restoring the database and work on the settings section

For the first method,

  1. we need to do the model store move with id conflict overwrite option from stage to development
  2. Full CIL
  3. Incremental CIL
  4. You may face the id conflict issue when you do the database synchronization. Id conflict issue is AOT and SQL database table id/ field id is different. What we need to do is update/match the AOT id in SQL table manually. You could get more detail into the link To update through AX with multiple tables, you might refer into the link
I got the below error message when I did the synchronization. The message saying that field id is already using by another field.
Illegal data conversion from original field PURCHPARAMETERS.TestField to PURCHPARAMETERS.ProductReceiptCharges: Unable to convert data types to anything but character field type (0 to 4).

This method is already explained in “Deploying customizations across Microsoft Dynamics AX 2012 environments” white paper in the topic “Recreate the staging environment from the production system”. You could download the whitepaper into this link

For the second method, you can refer into this link