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

Announcements

No record found.

News and Announcements icon
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.
  • Mohamed Amine Mahmoudi Profile Picture
    26,826 Super User 2026 Season 1 on at
    Moved from MS Dynamics AX Form
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,826 Super User 2026 Season 1 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
    21,302 Super User 2026 Season 2 on at
    Hello,
     
    You could create a custom lookup form and filter out future dates.
  • Raj Borad Profile Picture
    1,590 on at
    Hi,
    What is the reason for such requirement?
  • Komi Siabi Profile Picture
    13,253 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,997 Super User 2026 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

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

#1
Martin Dráb Profile Picture

Martin Dráb 510 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
CU-1234529-002 Profile Picture

CU-1234529-002 197

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans