Sunday, April 27, 2014

AX 2012 Error in loading label file. How to import new label files

Having been out of the AX development game for a while, I had not had the opportunity to import in label files in AX 2012 until April of this year. The label files went from actual files in the folder directories to within the AOT.

I needed to import some mods into a new environment and also include the label files. The label file from the AOT was exported into the XPO, but when attempting to import the file (Figure 1), I was receiving an error 'expected LABELFILE but found LANGUAGES' (Figure 2). From what I can gather the XPO only has language information of the label file but will not actually create the label file. This creates an issue on import. If we want the whole label file in the new environment (like I do), we should go a different route which I will explain below.

NOTE: This is just one way to move the labels. There are other methods. Choose the appropriate one for your situation

Figure 1 -  Import attempt of label file via XPO

 
 Figure 2 - The error trying to import a new label file via XPO

In the source environment, navigate out to the label you want to move to the new environment. Expand out nodes so you can see the language you need to migrate. Right click on the language (en-us for my example) and select 'Export to Label file' (Figure 3). You will need to select a location to save your .ald file for later import into the destination environment where you want the label.

The .ald file ('application label data' I believe) should look familiar to people from the previous versions of AX. In those previous versions there were also .ali (label index) and .alc (label cache) files. Just to clarify, depending on how you did the move in previous versions of AX, you didn't need to move those two files during migration; just moving the .ald would be sufficient. That is why in the method I'm showing, you only need to import the .ald file. The .ald file contains all the actual label data.

Figure 3 - The 'Export to Label file' option 

In the destination environment, right click on the 'Label files' node of the AOT. Select the 'Create from File' option (Figure 4). Again, to avoid confusion, this is for moving a label file with all of its contents to a new environment where the label doesn't exist. Select the .ald file exported from the source environment and click ok. You will receive a confirmation of the import (Figure 5).

At this point, you should see the new label file in your AOT. In my instance, it had a red line to the left of it indicating that the object needed to be saved. When right clicking on the new label file object in the AOT, I did not have an option to save the label like you can have on other objects. To save the file, I had to select the new object with the red line, then click the 'Save all' button in the AOT window tool bar (Figure 6). This saved the object. 

That should be all you need!

Figure 4 - 'Create from File' option when right clicking on the 'Label Files' node in the AOT


 Figure 5 - The imported label file confirmation

Figure 6 - Highlight the imported label and click the 'save all' button in the AOT window




Sunday, April 13, 2014

AX 2012 R3 order hold error: 'The hold note type must be specified on order parameters'

In AX 2012 R3, when attempting to enter notes in the 'Hold notes' field in the Order hold screen, you may receive the error 'The hold note type must be specified on order parameters' (Figure 1 below).

This is because the 'Hold notes' functionality for order holds leverages the document handling framework and each record created here must have a document type. This is the same issue with defaulting like in my previous post: http://daxdude.blogspot.com/2014/03/ax-2012-r3-manual-fraud-hold-errors.html

The location for fixing this issue is in a different location though. Navigate to Accounts Receivable module -> Setup -> 'Accounts receivable parameters'. Under the 'General' section's 'Setup' group (Figure 2 below), there will be a field called 'Note type' which must be filled in. This is the default document type for the order hold notes. Filling this in with a type should resolve the issue.

Figure 1 - The error when attempting to save text in the 'Hold notes' field in the order hold form

Figure 2 - Accounts receivable parameters 'Note Type' field