Skip to main content

Getting label text in different languages

When printing a report, Ax sets the used language automatically based on the user's settings. The selection of available languages for the client interface depends on the installed language license keys.

But sometimes, it may be necessary to change the default settings for reports. With reports needed for external use for example. Like invoices and packings slips you send to your customers. These documents require to be made up in the language of your customer. Ax is designed with this scenario in mind.

The language to use in the report can be set with following command:

element.design().languageID();

So for example:

element.design().languageID('en-us');

Place the code in the init method of your report, or in the fetch method.


You can use this in your own custom reports as well, with no limitation regarding the language license keys you bought. All you need are the appropriate label files. (Otherwise you get error messages like 'label @SYS123 not found in language xyz'.)

Got some time to spare? It can be fun to see how your documents look like in he - Hebrew, with its right to left printing

Popular posts from this blog

Dynamics Axapta: Sales Orders & Business Connector

Well, again folllowing my same idea of writting close to nothing and pasting code, I'll paste in some code to create a sales order from some basic data and the invoice it. I'll try to explain more in the future. AxaptaObject axSalesTable = ax.CreateAxaptaObject("AxSalesTable"); AxaptaRecord rcInventDim = ax.CreateAxaptaRecord("InventDim"); AxaptaRecord rcCustTable = ax.CreateAxaptaRecord("CustTable"); rcCustTable.ExecuteStmt("select * from %1 where %1.AccountNum == '" + MySalesOrderObject.CustAccount + "'"); if (MySalesOrderObject.CurrencyCode.Trim().Length == 0) MySalesOrderObject.CurrencyCode = rcCustTable.get_Field("Currency").ToString().Trim(); string sTaxGroup = rcCustTable.get_Field("taxgroup").ToString().Trim(); //set header level fields axSalesTable.Call("parmSalesName", MySalesOrderObject.SalesName.Trim()); axSalesTable.Call("parmCustAccount", M

Passing values between form and class

Class name is EmplDuplication and Form is EmplTable . void clicked() {    MenuFunction mf;    args args = new Args();    ;     args.record(EmplTable);     mf = new menufunction(identifierstr(EmplDuplication), MenuItemType::Action); mf.run(args); } Meanwhile, in the main() method of the EmplDuplication class, we need to put this Axapta x++ code to get the datasource: static void main(Args args) {     EmplDuplication EmplDuplication; EmplTable localEmplTable; ;     if(args.record().TableId == tablenum(EmplTable)) localEmplTable = args.record();     ... }