Store ‘Today’s Date’ in a field to use in workflow conditions in D365 CE

Most of us need this in our workflow conditions to check against – to have today’s date handy and then use them in If conditions in workflows. But, the filter in If conditions in workflows don’t let you dynamically select On or after ‘Today’.

And when you want to compare to today’s date on selection of On or After, you are forced to enter a date and not dynamically select Today.

onOrAfterBlank

To overcome this, here’s what you can do to simply store Today’s Date in all records.

Calculated Date and Time field

So workaround this, you can simply create a new Date and Time type of Calculated field to store the current date and use it in your workflow conditions or wherever you need it.
createCalculatedField

Make sure the type of the field is Calculated and then, Edit the criteria.

Select Now() function to set the value of the field.
Now
And the final criteria condition will simply look like the below
finalCriteria

Once you save and publish all your changes, you’ll see that the field is automatically populated with today’s date.
allDatesPopulated.png

Using in Workflow Conditions

Now, you can use the same in the workflow conditions as shown below –

addedCriteria

and you should be able to use this in your workflow conditions which could look like this

addedOnCondition

Hope this quick workaround comes handy!