web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

CRM Workflow for Date field

(0) ShareShare
ReportReport
Posted on by 108

Hi All,

I would like to create a workflow between 2 Dates fields. My workflow should trigger when the employee's termination date is within 1 year of the start date.

(Eg) Employee start date: 1/1/2019

       His Termination date: 1/10/2019.

In this example, he got terminated within a year and so my workflow should start and send an email.

How can I compare these 2 Dates fields in the workflow particularly to check if the termination date is within a year of starting date? ? Any help is much appreciated. 

Thank you,

Poorni.

I have the same question (0)
  • Suggested answer
    MikeC282 Profile Picture
    2,175 on at

    You can create a calculated field with the formula:

    DIFFINDAYS (new_employeestartdate,new_terminationdate).

    This will give you a number value between the termination date and start date. After which you can use a workflow where the calculated field is less than or equal to 365.

  • erhan.keskin Profile Picture
    2,253 on at

    Hi,

    You can create a WF and trigger it when the Termination Date is populated. In the WF, you can check if the Termination is within 1 year or not and send the email.

    In order to determine the difference there are different ways;

    1- There can be placed an if condition in WF

    e.g. Employee Termination Date is less than {12-months after Employee Start Date}

    2- There can be created a calculated field and calculate the difference, check the calculated field in WF

    3- There can be WF Activity developed to calculate the date difference in C# and use the result in WF

    Regards,

  • Poornimaa Profile Picture
    108 on at

    Hi Erhan,

    Thanks for your answer. Can you please help me with this?

    How to do "{12-months after Employee Start Date}" in workflow? I tried doing it but couldn't achieve.

    Many thanks,

  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi Poornima,

    Refer below blog. Its basically you need to select the operator as Set To on left hand side, select 12 month and then select the date. and then okay.

    https://www.powerobjects.com/blog/2015/04/14/how-to-add-a-calculated-date-on-a-date-field-with-workflow/

    Hope this helps.

  • erhan.keskin Profile Picture
    2,253 on at

    Hi,

    Here how you can do it;

    • Add "Check Condition" step in WF
    • In the condition page, select the "Employee Termination Date" field
    • Select the operator "Is Less Than"
    • Click on the "Enter Value" field
    • Select 12 in the month box on the right pane
    • Select "After" in the option sets below the month box
    • Select the "Employee Start Date" field in the field list below
    • Check if "{12-months after Employee Start Date}" is populated in the "Enter Value" box.
    • Save and Close

    pastedimage1575978853072v1.png

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 107 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 92

#3
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans