Skip to main content

Posts

Just needed to save some code I have been working on in my blog. This code is used for basically deconstructing ledger dimensions and default dimensions to be able to merge / overwrite dimension attribute values in the ledger dimension. My scenario is that during the processing of a ledger allocation, I have an "original" transaction that is being allocated. My destination transaction (the transaction that allocates the original transaction to a new ledger dimension) will inherit all the ledger dimensions of the original transaction BUT will have some of it's dimension attribute values overwritten, by a default dimension set up on the ledger allocation rule destination. Basically I deconstruct the ledger dimension of the original transaction and put all the found dimensions into a map. I the deconstruct the default dimension of the ledger allocation rule destination, and find the matching entries in my map, to replace them. When my "merged" map is comp...

Mental note to self: AIF changes -> Incremental CIL build.

After using a couple of hours trying to understand why my newly created AIF-service was not doing exactly was it was supposed to do, I found the solution. My AIF service uses a new table to accept some value from an external system. When a record is introduced into this table, a new ledger journal with a ledger journal line is created, and the voucher the line gets in the journal line, is updated onto my new table. This to allow for making it possible to use customized code in an AIF service, without having to make changes to the table methods of the Generel ledger journal tables and without risking custmized code made in the Service classes being overwritten by a service wizard update of the service. I had completed and activated my service, and was testing it. Then I discovered that I had forgotten to call the code to create the ledger journal, on my new table's insert-method, therefor I got records in my table, but no ledger journal. So I quickly inserted the call to t...

Dynamics AX 2012 annoyances (for (old school) developers).

Dynamics AX 2012 annoyances (for (old school) developers). Sorry about the parathesis. Having worked with Dynamics AX 2012 way back when it was called Axapta, I remember the days where the IDE had not undergone the Microsoft transition of being more Visual Studio like. And I long for some of the features I had back then. Now don't get me wrong I am all for the new possibilities the new IDE and editor gives a developer, but I wish that not all of the nice features we had in the old IDE had been removed in the new one. Keeping in mind that I will be sounding some of my customers, when they get a brand new AX installation: "That was possible in our old system!". ;0) Inspired by http://www.annoyances.org/  I decided to blog a little about the annoyances I have found working with Dynamics AX 2012's new IDE. So the annoyances I have encountered until now are: No "New form from template" in code projects The new feature that I expect is there to he...
Mental note to self: In Dynamics AX releases prior to 2012 to get the company currency you could do: CompanyInfo::find().CurrencyCode; In 2012 however you would do: Ledger::findByLegalEntity(CompanyInfo::find().RecId).AccountingCurrency

Project accounting 3 - Dynamics AX 2012 - indirect cost / burden

I was tasked with getting an indirect cost setup to work in project accounting 3, but encountered some problems. Having read the excellent set up guide at http://www.dynamicscare.com/blog/index.php/applying-indirect-burden-costs-to-project-ax-2012-labor-actuals/comment-page-1#comment-3324   (Thanks to Merrie Cosby for this) I proceeded to make the set up according to this guide, but failed to get it working. :( After some debugging I found that there is an error in the calculation of indirect costs when you run Dynamics AX 2012 in other languages than english. When setting up Compounding Rules the “Base amount” that you chose, is actually hardcoded in the logic that makes the calculations. The error can be found in class PSAIndirectCostCalculation method calculate: #define.BaseComponent(‘Base amount’) This could be corrected so that the define is #define.BaseComponent( “@SYS73028″ ) And the check for the BaseComponent if (_sId == #BaseComponent) is chang...

Dynamics AX 2012 - how to delete a layer

With the advent of model management in Dynamics AX 2012, Microsoft has gotten rid of the ax .aod files which in previous versions of DAX constituted the layers. In DAX 2012 adjustments for the meta data model and code are stored in the modelstore in the database. In previous version deleting a layer containing adjustments to the standard application consisted of delete the ax .aod file and synchronizing and compiling. How is this done in DAX 2012 ? The answer is a command-line tool called AxUtil. To delete e.g. the usr-layer in the application do the following: 1) Shut down all AOS-servers but one (applicable only if you have more than one AOS running). 2) Go to command line interface on the server where the last AOS is running. 3) Go to the folder where DAX's management utilities are placed, e.g.     C:\Program Files\Microsoft Dynamics AX\60\ManagementUtilities 4) Run the Axutil like this:     Axutil delete /layer: /db:   ...