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

Announcements

News and Announcements icon
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,244
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,811 Super User 2026 Season 1 on at
    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,244 on at
     
    Thank you for your reply, but that is what I am trying to avoid.
     
    //BR, Abhinay
  • Layan Jwei Profile Picture
    8,282 Super User 2026 Season 2 on at
    Hi,
     
    I don't think there is a way other than writing some logic to acheive it
  • Verified answer
    Jonas "Jones" Melgaard Profile Picture
    5,016 Most Valuable Professional on at
    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 284 Super User 2026 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 258 Most Valuable Professional

#3
Anton Venter Profile Picture

Anton Venter 228 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans