Hi,
I want to check the value of filed of type Date, so when ever user enters the today's date we should show the warning message in business rule, could you please guide me.
*This post is locked for comments
Thanks Mohamed
Hi Kishor,
I can think of two solutions for you:
1) I would normally use some simple JavaScript to do this. You can add a script to the OnChange event of the field to compare to today's date and then display the warning. Simple script like the following can display the warning:
Xrm.Page.ui.setFormNotification("Enter your information notification here.", "INFORMATION")
Xrm.Page.ui.setFormNotification("Enter your warning notification here. ", "WARNING")
Xrm.Page.ui.setFormNotification("Enter your error notification here. ", "ERROR")
2) If you specifically want to use business rules then I would suggest the following:
Add an additional new (todaysdate) field that you default its value to today's date. Again you will need a script to do that. You can then build your business rule to compare your Date field with the (todaysdate) field. This will be your Condition. You will then need to add an action to show the error/warning message.
Hope this helps!
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156