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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Workflow condition to alter field if date created on >365 days

(0) ShareShare
ReportReport
Posted on by

Hi

I am attempting to create a workflow to change a field if one field equals a specific option and then if the date created on is greater than 365 days ago. When I set the condition to find the created on date, then choose greater than, the next option is to select a date. I want the workflow to find a year ago not a specific date. Can this be done or would the workflow need to be changed every time and then run on demand?

Thank you

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Tushar2016CRM Profile Picture
    1,130 on at

    Hi ,

    You may add a timeout condition along with the other condition in the workflow .

  • Suggested answer
    Aiden Kaskela Profile Picture
    19,696 on at

    Hi,

    If you want an on demand workflow, you can't do it out of the box but you can with Workflow Elements (kaskela.wordpress.com).

    Your workflow would be:

    1) Call the new Activity "Add / Subtract a Date Time". Your parameters would be the Process Execution Time, Year, and -1. You'll get an output value "Modified Date" which will be right now minus a year.

    2) Check condition, compare Created On and "Modified Date"

    2.a) Do your conditional logic.

    Let me know if you need any help setting up the workflow.

    Hope this helps! I'd appreciate if you'd mark this as Answering your question.

    Thanks,

     Aiden

  • Community Member Profile Picture
    on at

    Sorry, I am not completely sure if that will work.

    I'll try and explain what we do and why we want the workflow setting up.

    The Sales team will win and create jobs, we have a field where we say if the job was won as "new business" or if it's just routine or an on-going contract etc. A Sales person may win 2 years of jobs and load these onto the system against an account and all jobs will be "new business". A manager has requested that new business can only last for one year, from then on it's a contract. He wants the jobs altered so he's then happy when reporting on the jobs. So back to the workflow, I was trying to ask it to look at the created on date and if it was longer than 365 days ago to then alter the job type from "new business" to "contract" and for it to always run everyday in the background.

  • Tim Dutcher Profile Picture
    2,100 on at

    If you have an Azure account, you can use a Logic App for this. I created an example recently that is close to what you're trying to do. mscrmrocks.wikispaces.com/Dynamics+CRM+and+Azure+Logic+Apps

    This solution would cost you next to nothing if you run it once/day.

  • Verified answer
    Aiden Kaskela Profile Picture
    19,696 on at

    Hi Donna,

    You can't do exactly that with workflows without using a Wait or Timeout workflow, which I'd recommend against because it can hurt performance. This sounds perfect for a calculated field, except you can't set up a calculated field using Today as a parameter. It's tedious, but I suppose you could set up a view for records that need to be changed (type=new business and createdon older than a year). Then you could bulk edit that view periodically. A Waiting workflow may be the best solution for this scenario.

    Hope this helps! I'd appreciate if you'd mark this as Answering your question.

    Thanks,

      Aiden

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans