Skip to main content

Posts

Dynamics AX 2012 ValidTimeState tables and form changing view from current to all

Valid Time State tables are new i AX 2012 a gives the developer the possibility to easily create tables that hold e.g. current setup data for various purposes, and at the same time keeping a "history" of the changes of the data in the table. For more reading: http://msdn.microsoft.com/en-us/library/gg861781.aspx I was tasked with doing a setup table with rates for calculating Vendor Bonus and I chose to base this a valid time state table. The customer asked for a button on the form, where you maintain the vendor bonus calculation setup data, so you could toggle viewing "Current setup" or "All setup" records (changing the view from actual to all records and vice versa in the form). I found that you can not change the ValidTimeStateAutoQuery property on the form data source in a form at run-time. It simply does not change anything, so I came up with the following solution: A boolean class member in the classdeclation method of the form: boolean

Show elements in a model from the ABOUT Dynamics AX form

Being in a situation where I needed to determine if a certain AOT-element was included in an installed model, I wonder why Microsoft didn't link the form showing installed models (Help / About Microsoft Dynamics AX / (link) Show installed models) or (Tools / Model management / Models installed) with the form showing Elements in installed models (Tools / Model management / Model elements. Opening the About Dynamics AX form you are able to access the list of installed models in the application, but you can not drill down to the elements included in the model. You'll have to go to the other form and make a filter to view the elements in a model. So I quickly made the attached code project, which simply adds a button (Elements) to the Installed models form, so that you can see a list of the elements included in the model. In the element list you can open the cross reference for each element, to make further drill down as to which elements are using the element included in the

A little extension for diagnosing tax code combination errors

In Dynamics AX 2012 if General Ledger module is setup to validate Check sales tax by entering either "Warning" or "Error" in the "Check sales tax groups" field, then Dynamics AX will throw an error (stop execution) or issue a warning in the infolog if it encounters a tax setup error when doing calculation of tax. The error looks like this: As you might know the tax calculation is based on getting the intersecting tax codes connected to the item tax group and the tax group of a given source document line. In this case I encountered we wanted to diagnose the origins of the error, because the error occurred when changing a customer group, which we thought was a bit odd. Digging a bit deeper, the error was not related to changing the customer group, but instead related to the following recalculation of credit limit on the customer that Dynamics AX wanted to perform. I traced the error to the class Tax and the method insertInterSection. Seing

Faster compilation for AX2012 - nice

http://blogs.msdn.com/b/axtools/archive/2013/11/04/parallel-x-compilation-for-microsoft-dynamics-ax2012-r2-in-cumulative-update-7.aspx http://blogs.msdn.com/b/axtools/archive/2013/04/30/ax2012-r2-hotfix-available-improves-compile-speed.aspx http://daxmusings.codecrib.com/2013/11/what-you-need-to-know-about-15-minute.html

Finding the cause of an incremental CIL-build error

I learned something new from one of my colleagues today, which is always nice. I have often been irritated by the Dynamics AX 2012 CIL-builds ability to be uninformative. The incremental CIL-build does not always tell you why it is unable to finish an incremental build, and up until today my procedure for fixing problems to be able to cil-build incrementally has been to run a complete x++ compile, which takes quite a long time. You can examine the cause(s) of the CIL-build failure by doing the following: 1) Login on the AOS-server. 2) Find the AOS server folder 3) Go to the folder of the instance where you experienced CIL-build problems. 4) Goto folder Bin\XppIL 5) Find the file Dynamics.Ax:Application.dll.log (an example of a full path for the file could be C:\Program Files\Microsoft Dynamics AX\60\Server\DEV_AX2012\bin\XppIL\Dynamics.Ax:Application.dll.log) In this file you can see the compile-errors which caused the incremental CIL-build to fail. Thank God for technic

My apologies.

I recently discovered that I have not been attending my mail box blog@fasor.dk. My sincerest apologies to everyone who have written to this mail box and gotten no answer. The mail box is now set up on my windows phone, and I will be answering sent to it.

How to work around best practice error: "A form that is not associated with other forms should be linked to at least one menu item"

How does one work around the Best practice error: "A form that is not associated with other forms should be linked to at least one menu item", when developing a custom lookup form ? Developing a possibility of a custom setup on the table ReqSitePolicy, that allows for calculation of "External Invent Onhand level", I added two new extended data types: ItemSearchInventSiteId exending InventSiteId ItemSearchInventLocationId extending InventLocationId and three new fields: ItemSearchShowAvailInventDataAreaId based on EDT SelectableDataArea ItemSearchShowAvailInventSiteId based on EDT ItemSearchInventSiteId ItemSearchShowAvailInventLocationId (based on a EDT ItemSearchInventLocationId) to the ReqSitePolicy table. To be able to make lookups for ItemSearchShowAvailInventSiteId and ItemSearchShowAvailInventLocationId fields based on the legal entity chosen in the ItemSearchShowAvailInventDataAreaId field (even though the currently active legal entity might