ID change in Dynamics AX data dictionary

If a table ID or field ID is changed in Dynamics AX, data are lost during synchronization, because the table with the old ID (and containing data) is dropped at the beginning and then a new table is created with the same structure but a different ID. The same is valid analogically for table fields. …

Continue reading ‘ID change in Dynamics AX data dictionary’ »

MCP Wallet Card

MCPs (Microsoft Certified Professionals) can order so called “Wallet Card”. I wanted to test how it looks and works and the card arrived yesterday, so let’s take a look at it… Wallet Card is a plastic card resembling a credit card and it’s not intended for giving away (you even can’t order more than one). …

Continue reading ‘MCP Wallet Card’ »

Moving a model to another layer

It looks like models in Dynamics AX 2012 don’t support moving between layers. Code is not being moved to another layer every day, but it’s also not an exceptional situation. We still have our old tools like export and import of .xpo files, but models just complicate this process instead of simplifying it (because you …

Continue reading ‘Moving a model to another layer’ »

AX, temporary table, Unit Test and DuplicateKeyException

Why do I link AX, temporary table, unit test and DuplicateKeyException? Because if I put them together, it behaves quite strangely. I have a temporary table, I insert some data into it and in an exceptional case, when a duplicity occurs, I catch the DuplicateKeyException and simply ignore such insert. And it works correctly. The …

Continue reading ‘AX, temporary table, Unit Test and DuplicateKeyException’ »

AX: Support for pessimistic locking

Let’s skip an introduction and jump right into code: while select forUpdate myTable { ttsBegin; myTable.MyField = ‘something’; myTable.update(); ttsCommit; } I meet such a code really often and it works very well under certain circumstances. Specifically, it requires optimistic record locking to be active. In such cases, Dynamics AX just check whether a record …

Continue reading ‘AX: Support for pessimistic locking’ »