Monthly Archives: September 2008

Sorting containers with multiple levels

I encountered a scenario where I wanted to find a record of a certain type somewhere in a big container. This got med thinking, and the result is the code below. I wanted to be able to loop through a container no matter how big it was or how many levels of new containers it contained.

This job searches through the container con1 and sorts the types Integer, Real and String into separate containers. In itself this job might not be very useful, but my goal was to build something that could easily be modified to work in many different cases when looking for different values in containers.

It also finds the specific records of VendTable, CustTable and SalesTable that I hid inside the container structure.
Continue reading Sorting containers with multiple levels

Total discount is calculated automatically – Bug

Update: This issue was reported and has a hotfix that can be downloaded from Microsoft. Just create a new support issue on the partnersource and ask for the following:

Knowledge Base ID: 953178

Original post

The following checkbox ”Total discount is calculated automatically” makes sure that every order has its total discount calculated before it is posted.

Accounts Recievable/Setup/Parameters/Prices tab

AR - Parameters - Prices

This is done in the “clicked method” that executes when the posting button is clicked, this means that total discount is calculated on the sales order even before you get the dropdown where you can choose the different types of posting i.e. Invoice or Confirmation. But as it turns out, this does not seem work if you multiselect in the sales order form(Click thumbnail below to see the form).

Continue reading Total discount is calculated automatically – Bug

A quick look at lists and a bit of XML

This is just a quick look at the List object in Dynamics AX. Just played around with it to see what functionality was there and what wasn’t. As you can see I just created a simple list of integers and also one with records from InventTable, if you wan’t to know what types can be placed in the list, check out the baseEnum “Types” in the AOT.

As a bonus I also created a xml file of the list of integers.

Continue reading A quick look at lists and a bit of XML