I was asked by a (danish) client if Dynamics AX could format amount fields according to lanaguage code of the customer. The problem arises as the danish format for amounts is: 999.999.999,99 That is thousand separators are the dot-sign and decimal separator is the comma-sign, and the english format is 999,999,999.99 That is thousand separators are the comma-sign and decimal separator is the dot-sign. Now the Ax client is able to run in several language of course, but this also imposes the regional settings on any reports printed. Thus if you run the AX client with danish language and prints an invoice for an english customer, all amounts will be printed using danish formatting. I wrote a small class that builds a list of all real-controls in a report. You can then feed it a langauge code and it will traverse the list of controls and format them accordingly. Thus we can now batch invoice customers and get invoices printed where amounts are formatted according to the language code of the...
My thoughts on Dynamics AX application development. I have been working as a consultant with Microsoft ERP-technology since 1994. Currently I work at Optimate A/S. My main focus is customization and application development. This blog is merely my place to put stuff that I want to remember. If anybody can benefit from reading this, that's great :0). Feel free to use any code snippets posted - but accept that you do this at your own risk!!!