Read the post all the way until the end - there's an ask for you guys there!
As many of you have already seen in the new AX 2012 release, there are a lot more tables present in the application, because we went through an exercise of normalizing the data model.
Another feature that was added at the same time was the Table Inheritance, allowing to sub-class tables and add additional fields reusing some of the behaviors of the base table.
All of it is great! The only problem with it is that it comes at a price - we now need to retrieve a lot more data and do a lot more joins between tables. So we tried to mitigate that by using field lists where possible and adding AdHoc query support, which basically eliminates unneccessary joins between tables from the hierarchy, if fields from these tables are not selected.
We have also implemented a number of things that allow us to clearly see if the field was selected in the user interface, the APIs needed for doing the same, as well as special handling for invalid field access.
This tutorial contains a form, which showcases the different aspects of data access in cases described above.
You can download the project with the tutorial from my SkyDrive.
On the first tab, we have the standard "On hand" view, which in the data model is a join between InventSum and InventDim, with group by clauses on selected fields, in this case, ItemId from InventSum and InventLocationId from InventDim, and aggregation on the AvailPhysical column.
As you can see from the screenshot below, the rest of the InventDim fields are shown as Unretrieved. So, naturally, accessing one of them from code, for example, should not be a legal operation.
To verify that statement, there are 2 buttons on the form, the Incorrect and the Correct was of accessing the field. Clicking on the first one simply tries to read the value out of the InventSiteId field, while the second one uses the API method TableBuffer.isFieldDataRetrieved() to first verify if the field can actually be accessed.
Note, that in the below example, both buttons will work, as in, there won't be any errors shown to the user. When accessing the field, even though it is not retrieved to the client, the value will be treated as the default value for that type, that is, an empty string.
In order to verify that we do not access fields in an invalid way like above, we have introduced a parameter, that will throw an exception if a field that was not retrieved is being accessed.
In order to enable this validation, you need to update the below shown parameter in the Server configuration form (Located under System administration \ Setup \ System). After changing the value (note, that it is per AOS) you need to restart the AOS for the changes to take effect.
Now, if you try to use the first button (under Incorrect) from above, you will get a stack trace, notifying you that the specified field was not retrieved.
We suggest that when testing your modifications in the application, you always have that flag enabled, so as to avoid unpleasant and hard-to-find bugs later on in the production environment.
On the second tab of the Tutorial form, the same type of information is presented, only this time the output is actually based on a new table inheritance structure I created.
The base table, GenericBall, contains 2 characteristics of any ball. SoccerBall is extending it and adding an additional characteristic (for the sake of the example, let's assume Brand is only relevant to soccer balls). This is basically a very simple table inheritance structure.
In the form, however, I am only selecting to view the Brand field from SoccerBall, not selecting the other 2 fields from the base table. As expected, they show up as Unretrieved in the user interface.
However, there is one difference in how Scsc tables are handled - and that is, they will always throw an exception when you try to access one of the unretrieved fields.
The two buttons above the grid demonstrate that. Try it out, enabling/disabling the server configuration parameter shown above.
That's pretty much all there's to it. Let me know if you have any questions.
Now, I have one thing to ask you all too.
We in the AX Test team have done our best to find invalid field access problems before the release, but if you find one using the approach above, please log it either through the standard Microsoft channels (partner/ MsConnect/ etc.), or as a comment directly under this blog post.
Thank you!
Showing posts with label Microsoft Dynamics AX. Show all posts
Showing posts with label Microsoft Dynamics AX. Show all posts
Friday, October 28, 2011
Tutorial: AX 2012 - Invalid field access or Accessing unretrieved fields
Labels:
data model,
Dynamics AX 2012,
field access,
Form Development,
Microsoft Dynamics AX,
Performance,
retrieving data,
server configuration,
Table,
table hierarchy,
table inheritance,
tutorial
Saturday, May 7, 2011
Tutorial: Table Relation properties in AX 2012
As many of you already know, Microsoft has put in a lot of effort into normalizing the tables in AX 2012 and consolidating all the data modeling tools in one place - the table itself. As part of this effort, a number of new properties have been introduced on Tables, and in this post I would like to cover some of them, namely the properties on Table Relations.
The new properties you will find on a Table Relation in AX 2012 are:
Hua Chu from the AX team has written a Guideline document, explaining how these properties should be set for Relations you add to Tables in AX. Note that in AX 2012 most of the above information is not actually used at runtime. This is something that will happen in future releases.
I have modified the document so that it contains the information relevant for partners and customers extending the standard application and have uploaded it to my SkyDrive.
(Modified: Something weird is happening with SkyDrive, so I have also uploaded the file to my personal site - download)
The document requires certain knowledge of Entity Relationship Modeling (ERM) and UML notation.
Disclaimer:
This document is intended as a guideline only, and should not be used as a Step-by-Step instruction.
Changes to any of the described functionality might still happen before AX 2012 RTM.
Your feedback and questions are, as always, welcome.
The new properties you will find on a Table Relation in AX 2012 are:
- Cardinality
- RelatedTableCardinality
- RelationshipType
- Role
- RelatedTableRole
- UseDefaultRoleNames
- CreateNavigationPropertyMethods
- NavigationPropertyMethodNameOverride
Hua Chu from the AX team has written a Guideline document, explaining how these properties should be set for Relations you add to Tables in AX. Note that in AX 2012 most of the above information is not actually used at runtime. This is something that will happen in future releases.
I have modified the document so that it contains the information relevant for partners and customers extending the standard application and have uploaded it to my SkyDrive.
(Modified: Something weird is happening with SkyDrive, so I have also uploaded the file to my personal site - download)
The document requires certain knowledge of Entity Relationship Modeling (ERM) and UML notation.
Disclaimer:
This document is intended as a guideline only, and should not be used as a Step-by-Step instruction.
Changes to any of the described functionality might still happen before AX 2012 RTM.
Your feedback and questions are, as always, welcome.
Labels:
aggregation,
Association,
Cardinality,
Composition,
data model,
Dynamics AX 2012,
Microsoft Dynamics AX,
Relation,
Table
Monday, April 11, 2011
Microsoft Dynamics AX 2012 Beta now available for download - please share your feedback
As some might have noticed, I was quiet for quite some time now. I won't go into much detail as to why. What I want to say is that I along with a number of dedicated people have been hard at work on the release of a solution for Process Manufacturing and Distribution industry, which is also available in Beta through the below links.
Those of you working in this industry, I would be grateful for your feedback on our work so far, as well as any bug reports or design change requests for the RTM version or future releases.
Any other feedback, especially on the development tools and environment, is also welcome, of course.
Virtual Machine:
Installable bits (ISO & IS IExpress pkgs):
https://mbs.microsoft.com/partnersource/support/selfsupport/productreleases/AX2012Beta
Those of you working in this industry, I would be grateful for your feedback on our work so far, as well as any bug reports or design change requests for the RTM version or future releases.
Any other feedback, especially on the development tools and environment, is also welcome, of course.
Virtual Machine:
https://mbs.microsoft.com/partnersource/marketing/marketingcollateral/demos/AX2012DemoToolsMaterials
https://mbs.microsoft.com/customersource/downloads/servicepacks/AX2012DemoToolsMaterials Installable bits (ISO & IS IExpress pkgs):
https://mbs.microsoft.com/partnersource/support/selfsupport/productreleases/AX2012Beta
MSDN Dev Center:
TechNet Library:
Wednesday, July 7, 2010
Advertisement: MDCC is looking for talent!
Hello, all.Microsoft Development Center in Copenhagen has a number of open positions for Software Development Engineers in Test (SDETs), to work in the team responsible for shipping the latest version of the Microsoft Dynamics AX product.
Below is a detailed description of one of the currently open positions (SDET II role). Salary level and title are based on your education, number of years of experience, etc., nothing new here. Dynamics AX background is, of course, a plus (I assume this applies to all my readers).
The Microsoft Dynamics AX product group has an open position for a Software Development Engineer in Test (SDET) within our supply chain management teams. The position provides unique opportunities for professionals with a diverse background of business acumen and software engineering to work on one of the fastest growing Enterprise Resource Planning (ERP) products in the market.
Responsibilities:
Write and review technical requirements and design documents
Plan, design, and write code for automated tests of features within the supply chain management features of Dynamics AX
Create and use test tools and processes to both increase effectiveness in the daily work and assure quality of the product
Collaborate with other engineers to ensure all feature areas achieve the desired high level of innovation and quality our customers demand.
Requirements:
We are looking for engineers with a strong background in object oriented development. Experience with business applications or ERP solutions are pluses.
Software development experience, particularly within C#, C++ or similar object oriented programming languages
Strong technical and analytical skills
Excellent problem solving and design skills
Ability to work independently - and in teams
An excellent command of written and spoken English
Experience with Microsoft Dynamics AX or ERP products is a plus
Experience with X++ (a Dynamics AX language) is a plus
Software testing experience with an organized and structured approach is also a plus
We are also looking for less experienced people for the IAESTE student program, so all you excellent Computer Science students, interested in developing business applications and working for one of the world's leading software companies, welcome!
If you are interested in applying for the positions, please e-mail me your up-to-date CV at ivan.kashperuk(@nospam)hotmail.com
An additional request I would like to make is to leave a comment here, if you are invited to an interview, describing how it went, how you were treated, and what your impression was of the entire process, the MDCC campus, the interviewers, etc. This will help us make improvements in our hiring process, so I am really waiting for your comments. Note that anonymous comments are allowed.
Some additional information about MDCC:
Microsoft Development Center Copenhagen (MDCC) was created in 2002 following the acquisition of the Danish company Navision. Today, it has grown to be Microsoft’s biggest development center in Europe and a spearhead in the European IT industry. MDCC is Microsoft’s Center of Excellence for Supply Chain Management and drives the development of several of the Microsoft Dynamics ERP (Enterprise Resource Planning) products. Our products enable companies throughout the world to optimize the planning of their resources – and increase their revenues.
Today, the development center gathers around 650 people from more than 40 different countries. Every third employee is a non-Dane and that makes MDCC to one of the most international companies in Denmark. MDCC has been widely awarded for its unique work culture and is a coveted career booster for top talents from all over the world.
Labels:
Advertisement,
hire,
MDCC,
Microsoft,
Microsoft Dynamics AX,
SDET
Subscribe to:
Posts (Atom)




