It’s been a while since I’ve posted, but here’s a small little post about what I think is a cool feature in Ax 2012!
In AX2009, when you have a table that has a relation to another table and you want to use it in code, you have to provide a method that performs a select on the other table and returned the related record. ( fe : SalesTable.SalesLine() ) Well this is something cool in AX2012. Here’s how you can do it now.
On the main table you have the relationship. There you can use a new property called CreateNavigationPropertyMethods and set it to Yes.

Once you have done this, there will be a method on you table that returns the related record.

This articles will be brief, because I don’t have much time between the sessions J
Yesterdag was the first day of the Dynamics Technical conference and following sessions were attended by me:
- Programming model improvements Part 1 of 2
- Programming model improvements Part 2 of 2
- Developing in .NET managed code and X++ Enhancements
- Solving the element ID problem
Programming model improvements Part 1 of 2
From this session, I remember the following additional features:
- Table inheritance is added. So now you can have abstract tables which are then inherited by child tables.
The unit of work pattern also comes into play here as there will be issues to address to manage transactions and code dealing with one ‘virtual record’ which may consist of multiple child tables. (Vehicle table with child tables bycicle, car, truck, …)
- Next to normal X++ temporary tables, there is now also support for temporary tables in SQL Server
- Date effective tables have been added. This means you can actualy filter records based on an ‘effective as of date’
- Eventing has been added so now you can actually subscribe methods to events on other classes. Also, this is implemented by drag and drop so it is actually user friendly to do this.
- The normal batch framework has been ‘adjusted / replaced’ with the SysOperation framework
- The tree of linked tables are then linked by RecId, but you can actually have a key with fields specified in a field group to be used in the design when showing on what the linked was based
- Tables have full text indes support now : This means they can be optimized for searches on text fields to look for certain words in the body.
Historical data pattern
This one is actually cool. Let’s say you have a historical table to contain a history of sales. Then you can set properties on the SalesTable datasource and the kernel will keep the history for you. So when you change values on the sales order for example, the kernel will create / update records in the historical data table.
Query ranges vs Query filters
When using joins (outer joins) the query ranges can produce incorrect outcomes. But now query filters are used to fix that. Instead of using the QueryRange object on the query, you can now also use QueryFilter objects and they are more optimized for SQL Server.
The other sessions will be describes in following posts as there is new session beginning right now J
“Today is a good day to die”
Dat moet zowat het idee geweest zijn van mijn teerbemind 21ste eeuws modern tijdverdrijf dit weekend. Hij kon er geen beter moment voor uitkiezen, de vrijdag net voor het weekend ! En toch gebeurde het : de beruchte Yellow Light Of Death op mijn 80GB versie van de ps3. Nu voor de leken onder ons : de boel is wat te warm geworden en de grafische kaart of CPU (we kunnen nog kiezen) is door de warmte los gekomen van het moederbord. Daar ging mijn 600€ kostende allesdoener !
Alsof het nog niet genoeg is : net na de twee jaar garantie ! Wat er waarschijlijk op neer komt dat hij terug naar Sony mag voor een luttele 200€ en dat het in de toekomst nog kan voorvallen. Maar net hier zijn er dan twee opties :
- Braafjes 200€ dokken en hem opsturen voor reparatie
- Hem openvijzen en met een heatgun de boel verhitten zodat de cpu / gpu terug aan het moederbord smelt
Indien ik van sony te horen krijg dat hij effectief niet meer kan worden gemaakt met de garantie dat het niet meer voor komt, dan wordt het waarschijnlijk de tweede optie dan maar want onderstaande video toont exact hoe dit moet
Video : Yellow light of death + Fix
YellowLightOfDeathFix1
YellowLightOfDeathFix2