New resources available on Microsoft Learn
Did you know that Microsoft Learn offers free training modules to assist you on your path to mastering Dynamics 365 for Finance and Operations? Become an expert at your own pace or share with your team to foster growth.
Dynamics 365 2019 release wave 2 plan Discover the latest updates to Dynamics 365.Release Plan | Weekly Deployment Notes
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants.Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements.
ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Talent TechTalks
Created a form in which FROM DATE and TO DATE is there. User must inter TO DATE greater then FROM DATE. The EDT of both the date is TransDate.
Please help me to solve this problem.
When do you want to run the validation?
Also, I see you've selected "current version". Do you mean AX 2012 (then I'll change the tag to AX 2012) or D365FO (then I'll move it to D365FO forum)?
When user enter from date. After that he must enter to date but greater then from date.
You're saying that you want to run the validation before user selects "to date", which makes no sense. It would never pass.
Usually there is a meaningful place when running validations, such as when saving a record or confirming a dialog. Unfortunately you told us nothing about your actual requirement, therefore we can't tell you how to design it.
Sorry Martin, I was wrong in putting up my question.
User must get a message if he selects TO DATE on or before the selected FROM date. Where is can write code to do so and what line of code I suppose to write and on which method.
Table Modified field event looks good place to me. Check if from date is blank and show error to fill that in.
Edit : I agree with Martin ValidateField is the method . You have to put your code , Although its possible through modified field Validate Field is the method you have to write code in.
No, modified isn't the right place. If the fields are bound to a table, you should use validateField() on the table unless it's logic specific to the particular form.
If the field is unbound, se validate() method on the control itself.
Nevertheless I would prefer allowing users to insert valid data in any order they like.
Business Applications communities