Showing posts with label How to use Date Effectiveness. Show all posts
Showing posts with label How to use Date Effectiveness. Show all posts

How To: Use Date Effectiveness Feature in Ax 2012

  • Date effectiveness is a new feature in Dynamics AX 2012 allowing developers to easily create date range fields.
  •  Date ranges are used for defining record validity between the specified dates, for example, defining employee contract dates.
  • This feature significantly reduces the amount of time that developers spend writing code and also provides a consistent approach to implement data range fields.

Note: > We will implement date range validation on the standard E-mail templates form.
          > This Example(Data, Tables, Forms etc etc) is given on the base of Contoso Domain
          > You ll also find an Xpo File To Download at the end of the example.
          > While importing into your AOT it ll ask for replacing the existing one, you can replace it with the new table and form. 

Procedure:





  • 1. In the AOT, find the SysEmailTable table and change its property as shown below 
  • :
  •  






  • Property --> 
  • ValidTimeStateFieldType : Date

    2. Notice the two new fields that are automatically added to the table :




    3. Add the newly created ValidFrom and ValidTo fields to the existing emailIdIdx index
    and change the properties shown in the following table:


    4. The index should look similar to the following screenshot: