locked
CRM Workflow - How to compare with current date RRS feed

  • Question

  • I've to define a workflow in dynamics CRM 2011, with the condition as

    IF account.expirydate - 7 <= currentdate then

    create a reminder task for the owner of the account.

    My problem is that how should I compare exirydate with currentdate. I tried to use EXECUTIONTIME value of CRM process to compare but it seems it doesn't work because reminder TASK is not created which inside this IF condition. I want to know, does this EXECUTIONTIME return datetime value of only time?? Can I use it to compare with date field? What is the other alternate I have to compare with current date in CRM workflow.

    Urgently looking for answers.

    Monday, June 13, 2016 8:05 AM

All replies

  • Hi,

    I'm not sure what you're trying to do here, is this a "create reminder when it's a week before expiration date on an earlier created object" or what is it you want to do?

    Regards


    Rickard Norström Developer CRM-Konsulterna
    http://www.crmkonsulterna.se
    Swedish Dynamics CRM Forum: http://www.crmforum.se
    My Blog: http://rickardnorstrom.blogspot.se

    Monday, June 13, 2016 1:32 PM
  • Yes I wanted to create reminder TASKS for sales people. I've managed to overcome this problem. NOW I'm facing another problem. I've created a recursive workflow on ACCOUNT entity, which should run automatically without any trigger condition. I've used TIMEOUT option for it and set the property as ON DEMAND & CHILD WORKFLOW. Now my problem is, HOW TO execute this workflow, because system has about 3000 ACCOUNTS, so do I need to execute it for all these ACCOUNTS manually as ON DEMAND workflow ?? What is the option available within CRM that I can trigger this workflow automatic.

    Please guide and provide your suggestions...Thanks.

    Tuesday, June 14, 2016 1:23 AM
  • Hi,

    I wouldn't have it as a child workflow, unless you want to start it from another workflow. For 3000 accounts, I would to a manual start, go with 250 records per page and mark all, run the workflow, repeat 6 times.

    I would then also set a trigger on change of the expiration date plus on create, that way it should always have a workflow running. Oh, and have a clause saying that if the expiration date is changed, end the workflow running, otherwise you will have a shitload of these. If you don't have a trigger, how do you plan on starting new workflows after the expiration date has been changed?

    Regards


    Rickard Norström Developer CRM-Konsulterna
    http://www.crmkonsulterna.se
    Swedish Dynamics CRM Forum: http://www.crmforum.se
    My Blog: http://rickardnorstrom.blogspot.se

    Tuesday, June 14, 2016 10:21 AM