Search code examples
formsdateaxaptamicrosoft-dynamicsax

How to restrict the date selected


How to disable dates greater than today in a DateEdit control in an AX form?

Is possible with a date extended data type?


Solution

  • It is not possible to restrict date ranges on the extended data type level.

    You will have to validate the entered date.

    The method where to validate (preferred method first):

    1. validateField on table
    2. validateWrite on table (if comparing two entered dates)
    3. validate on form field
    4. validate on form control

    Also see method sequence.