Valid Time State/Date Effective Framework

D365 features a new framework called the date effective framework, or valid time state tables. There are many easy examples of date effective data. The easy example is some sort of rate table, where rates become effective and expire at certain times. Other examples could be bills of material or revisions of items that become effective or expire at certain dates.

Date effective comes in two flavors. One uses regular date fields, the other UtcDateTime data type. Obviously, the UtcDateTime gives you more granularity to the second (and the nice timezone support that comes with UtcDatetime). For this example, we'll just stick with an easy example using regular dates.

First, we create a new table and we'll call it LeaveRequest table. We'll give the table a LeaveRequestID field which identifies the different request ID.



On the table's properties, we'll set the ValidTimeStateFieldType to "Date". This will automatically create two new date fields called "ValidFrom" and "ValidTo".



Next, we'll add an index on the table, containing our LeaveRequestID identifier and the two date fields. The index needs to be unique, and set as an alternate key.





Output :

Comments

Popular posts from this blog

SSRS Report using Controller , Contract and RDP classes in D365

Exporting data to Excel through X++ code

COC for Form level method

How to pass the parameter from one form to another in Dynamic365

Multi Select Lookup in SSRS Report in D365