Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Business Rule- Dynamics 365

Posted on by 3,702

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.

6320.Untitled123.png

*This post is locked for comments

  • Kishor Kumar Profile Picture
    Kishor Kumar 3,702 on at
    RE: Business Rule- Dynamics 365

    Thanks Mohamed

  • Verified answer
    M I Mostafa Profile Picture
    M I Mostafa 4,257 on at
    RE: Business Rule- Dynamics 365

    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!

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans