0

I have a date field which the user will select from the calendar dropdown, now I want only the current date to be selected, future date and backdating should not be allowed. I am using Microsoft dynamics NAV 2018.

Annie
  • 33
  • 11

1 Answers1

1

Your only option is to put some code with conditions checks to OnValidate trigger of the field you want to restrict. There is no way to change calendar behavior.

Put either of this into your OnValidate trigger of the date field

Testfield(”Your field”, today());

Or

Testfield(”Your field”, workdate());
Mak Sim
  • 2,148
  • 19
  • 30
  • Oh alright thank you @Mak Sim But please I'm just starting to learn C/AL, Could you please help me out with the code that can do this. Thanks – Annie Oct 10 '22 at 09:55