locked
Can you cancel a previously started workflow from a standard workflow based on a field changing? RRS feed

  • Question

  • Hi,

    I have a requirement where I send out an email when a custom entity is created. I wait for a specified number of days and then send out a reminder email.

    The problem is, if the end date changes I want to cancel the currently running workflow and restart it using the new end date. I think I can do this in a plugin, but I was wondering if there is any way to do it through the use of standard workflows? I doesn't seem like using the "Parallel Wait Branch" will work because I cannot trigger it by the changing of a field value.

    Thanks,

    Gary 

    Wednesday, June 26, 2013 6:03 PM

Answers

  • Hi Gary,

    Actually, Crm will automatically change the wait in your workflow if the date changes. It creates a subscription to the attribute and then reevaluates the postpone until date when the attribute changes.

    Cool eh?!

    hth


    Scott Durow
    Blog www.develop1.net    Follow Me
    Rockstar365
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Wednesday, June 26, 2013 9:44 PM
    Answerer

All replies

  • CRM use .NET workflow, so you can use custom activity to get the persisted workflow from the database and probably can cancel/suspend the workflow.

    I hope you get the idea.


    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

    • Proposed as answer by Litonn Wednesday, June 26, 2013 7:04 PM
    Wednesday, June 26, 2013 7:04 PM
  • Hi Gary,

    Actually, Crm will automatically change the wait in your workflow if the date changes. It creates a subscription to the attribute and then reevaluates the postpone until date when the attribute changes.

    Cool eh?!

    hth


    Scott Durow
    Blog www.develop1.net    Follow Me
    Rockstar365
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Wednesday, June 26, 2013 9:44 PM
    Answerer
  • Hi Scott,

    Just to make sure I understand, if I say wait until 14 days before a given date, and the date changes, it will change when the wait will end? That is cool!

    Thanks again!

    Gary


    • Edited by GaryMk Wednesday, June 26, 2013 9:53 PM Typo
    Wednesday, June 26, 2013 9:52 PM