Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 general forum

How stop the user from selecting prior date using workflow

(0) ShareShare
ReportReport
Posted on by 140

Hello how do I stop a user from selection prior date ex  Only one prior date can be entered for an Date (E.g. Current date = 03/06/2019, Date can only be 03/06/2019 or 03/05/2019) I want to this using workflow to limit the user to select today's date or yesterday date  

  • Suggested answer
    Kokulan Profile Picture
    Kokulan 18,052 on at
    RE: How stop the user from selecting prior date using workflow

    Hi

    If you use a Calculated field to get Today's date and tomorrow's date, it will include the time but for your requirement, it should just only consider date, not time.  The same issue you will have if you use the workflow process execution time as it will include the current time.

    You could try the following, assuming you have the latest version of Dynamics CRM, you can achieve what you want using the following workflow

    ScreenClip-_5B00_259_5D00_.png

    The Cancelled step should have the message to be displayed as shown below

    ScreenClip-_5B00_259_5D00_.png

    Once the workflow is activated, if the user tries to set any date other than today or yesterday, it will display the following and will not allow the user to save the record

    ScreenClip-_5B00_256_5D00_.png

  • Suggested answer
    Qurator Profile Picture
    Qurator 80 on at
    RE: How stop the user from selecting prior date using workflow

    Hi,

    Within the check statement on the workflow, you could use the process execution time to determine if the entered value is too far behind today's date. 

    1665.DynamicsCommunity.png

    You could then cause the workflow to fail so that the user receives an error & the save action is prevented. 

    Thanks,
    Jason

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,321 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans