Basics of working with date effective framework in AX 2012 – Part 1Continue reading
Sometimes we have a need to follow data changes during some period of time. In order to achieve this during development in Dynamics AX 2012 we might want to use date effective framework.
In the first part of blog I am going to introduce implementation of the framework and in the second part - describe basics about maintaining the data with it. For more examples and detailed description I refer to MSDN from which you can download white paper https://technet.microsoft.com/en-us/library/hh335187.aspx↗.
If we want to use data effective table in our database design, here are the steps we need to follow in order to make it happen.
For a new created table that we want to be a date effective one, first we have to decide about granularity for ValidFrom and ValidTo fields in which will be stored an information about date.
We can choose between Date and UtcDateTime options. Choice depends on our needs. If we want effectiveness of a record at the same UTC time all over the world we are selecting UtcDateTime. If we want record to be effective on a certain date no matter on current location of a customer we are choosing Date.
After this step ValidFrom and ValidTo fields will appear in our table with a type reflecting our choice – Date type for Date and DateTime type for UtcDateTime
Second thing that we have to do is set up an index on the table. In its properties we are setting as you can see in picture below. Before setting ValidTimeStateKey property, put ValidFrom field inside index.
In addition we have to decide if we want to allow date gaps in our data. For instance we might want to track employee assignment over time, then it is logical to allow gaps in dates because worker can be unassigned for some time. But on the other hand we can have an "unassigned" as one of possible statuses for our worker. Then we don't want to allow gaps to be able to follow date continuum. Based on that choice we are setting ValidTimeStateMode property on the index. After this setup ValidTo should appear in our index fields list. Best practice is to select Yes from Included Column list on properties tab.
It is recommended to not set Configuration keys on any of the ValidTimeStateKey columns.
By default you can't set them on ValidFrom and ValidTo fields.
Remember to set new created Index as a ReplacementKey in table properties.
And that's it, our table is ready to track the data!
Value information can be also that date effective framework is integrated with table inheritance functionality but each property we set in order to achieve date effectiveness has to be set on the root table.
The retail industry is still dealing with the effects of the pandemic that lasted almost three years. In addition to this, further global events are causing disruption to the supply chain or financial stability of many retailers globally. As the industry confronts new challenges shaped by economic and geopolitical factors, it also faces trends influenced by changing customer expectations and needs. Here are 5 developments and trends to watch.
An interactive, AI-powered support for sales, customer service, marketing, and supply chain - Microsoft Dynamics 365 Copilot leverages generative AI and natural language processing technology to perform simple, yet time-consuming daily tasks that workload employees but can be automated.
Every company management facing a system change wonders what steps should be taken to ensure that this change does not cause turbulence to its business. Identical dilemmas are faced by any IT company that provides services to implement a new system. I will focus on these dilemmas today.
Artificial intelligence (AI) and machine learning (ML) technologies are changing business every day - just as new tools and services are frequently emerging to expand their use cases. PwC estimates that the impact of these technologies on the global economy will add approximately $15.7 trillion to its value by 2030 (1).