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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

How to hide future dates in the date dropdown

(1) ShareShare
ReportReport
Posted on by 534
Hi Guys,
 
In the date dropdown field we have all the dates like past and future dates, but I need to disable the future dates in d365fo. can you please help me to solve this.
I have the same question (0)
  • Mohamed Amine Mahmoudi Profile Picture
    26,445 Super User 2025 Season 2 on at
    Moved from MS Dynamics AX Form
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,445 Super User 2025 Season 2 on at
    Hi @Adam123,
     
    it's better to use validation to prevent the user to select a future dates.
     
    for e.g. you can use the validateWrite in your table or datasoure in form :
    public boolean validateWrite()
    {
        boolean ret;
    	ret = super();
    	
    	if(this.yourDateField > SystemDateGet())
    	{
    		ret = checkFailed("your message here");
    	}
    	
    	return ret;
    }
    Best regards,
    Mohamed Amine MAHMOUDI
  • Suggested answer
    Anton Venter Profile Picture
    20,346 Super User 2025 Season 2 on at
    Hello,
     
    You could create a custom lookup form and filter out future dates.
  • Raj Borad Profile Picture
    1,428 on at
    Hi,
    What is the reason for such requirement?
  • Komi Siabi Profile Picture
    13,109 Most Valuable Professional on at
    The date drop-down showing all dates is a system design and you won't be able to change it. However, you should be able to control it individually on tables. 
     
    By the way, like Amine said, you can validate the date. 
  • Suggested answer
    Adis Profile Picture
    6,069 Super User 2025 Season 2 on at
    Hey,
     
    I would suggest the following.
     
    Take any form go to Options\Regord info\Database log (see 1) - it doesnt matter if you have the database log active on this table.
    In the created date and time column the to date (see 2) is the current date. Check in visual studio how that was implemented and reuse the code.
    For the "From date" you could just delete the entry, which will imply being 01/01/1900
     
     
     
    Kind regards, Adis

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 422 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans