web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Disable past dates in date lookup

(1) ShareShare
ReportReport
Posted on by 1,215
Hi,
 
Greetings!
 
In the date lookup, is it possible to disable past dates, e.g. dates before today or a specific date?
 
This way we may not have to write the validation logic.
 
//BR, Abhinay
I have the same question (0)
  • Verified answer
    Mohamed Amine Mahmoudi Profile Picture
    26,316 Super User 2025 Season 2 on at
    Disable past dates in date lookup
    Hi,
     
    I suggest you perform this operation in the ValidateWrite method in the table concerned.
     
    e.g.
    boolean validateWrite()
    {
       boolean ret;
       ret =super();
       if(this.date < today())
       {
          ret = checkFailed("your message here !");
       }
    }
    Best regards,
    Mohamed Amine MAHMOUDI
  • Abhinay Tharwal Profile Picture
    1,215 on at
    Disable past dates in date lookup
     
    Thank you for your reply, but that is what I am trying to avoid.
     
    //BR, Abhinay
  • Layan Jwei Profile Picture
    8,034 Super User 2025 Season 2 on at
    Disable past dates in date lookup
    Hi,
     
    I don't think there is a way other than writing some logic to acheive it
  • Verified answer
    Jonas "Jones" Melgaard Profile Picture
    4,894 Super User 2025 Season 2 on at
    Disable past dates in date lookup
    I don't recall there being any dialogs like this in the standard application, so I'm afraid that the answer is that you will have to write your own extensible control. But you can borrow a lot from the standard application.
     
    If you do want to investigate this, there is a date picker that's implemented that way.
     
    The date attribute type for fixed asset's attributes (EntAssetObjectAttribute) in asset management uses a form lookup as it's date picker.
     
    The date picker form is called "SysDateLookUp"; It uses the extensible control "CalendarControl":
    You can find the CalendarControl class in the AOT, and work from there.
     
    I have marked the line that's interesting for you

     
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,177

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 860 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 593 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans