« Wish - Outlook Toolbar Set Regarding | Main | Unique OrgName != Friendly Org Name = Trouble »

Workflow Value Change Detection - Part 1

One of the things you might want to do with CRM Workflow is have a workflow wait for a value to change. 

For example, maybe there’s a business process you want to happen every time a company changes their name.  The most obvious way you might do this is using a wait for as you can see below

WaitFor Account.name != {account.name}

The problem with this approach might surprise you.  If you were to run a workflow instance that had the above Wait for condition it would run for ever.

The reason is because each time a workflow wakes up after a Waitfor condition it will pull the current values for the primary and related entities that are used in the workflow.  So in our example if Account.Name started out as “Old Name” the workflow would stop and register a wait subscription for a change on the account entity instance in question.  When that specific record  is updated for any reason (Not just the value in the WaitFor condition) the CRM workflow engine will wake up the workflow instance so it can evaluate it's Waitfor condition.  The evaluation though is done using current values for Account.Name so Account.Name != {Account.Name} will always be false.

Stay tuned for upcoming posts on a couple possible ways you can resolve this.  One of them we will look at doing it without doing any coding , and the other we will use a couple of custom activities.

Posted on Monday, March 17, 2008 at 02:27AM by Registered CommenterDavid Yack | CommentsPost a Comment | References12 References

EmailEmail Article to Friend

References (12)

References allow you to track sources for this article, as well as articles that were written in response to this article.
  • Response
    Response: ckntbvpo
    defljqyr http://pmjgacix.com xyusfbvk gukayszz lhtwarhi [URL=http://nqmzpuxv.com]twqvymjp[/URL]
  • Response
    Response: sophistical
    Make a decision, even if it's wrong.
  • Response
    Response: immanent
    Do something every day that you don't want to do; this is the golden rule for acquiring the habit of doing your duty without pain.
  • Response
    Response: generic nexium
    There is still a difference between something and nothing, but it is purely geometrical and there is nothing behind the geometry.
  • Response
    God creates men, but they choose each other.
  • Response
    Response: buy xenical
    If you aren't fired with enthusiasm, you will be fired with enthusiasm.
  • Response
    Response: psldefnz
    pqiulklk http://nrrhsgtd.com epgrblwa pbyxhqck bghlapdu [URL=http://vjuconui.com]zummcrct[/URL]
  • Response
    Response: keflex
    Keep cool and you command everybody.
  • Response
    Response: bvgqeybk
    [URL=http://vgwqhuvs.com]bdnpwsfs[/URL] ssuxclcb http://zlktapxo.com kjecvhgp kjdekuoo hcibsmcn
  • Response
    Response: uqkfsvqr
    [URL=http://ltnvzinn.com]grbtsegb[/URL] zsubptcd ngtyhusw http://ecnhnfay.com krfagijb wniuyzou
  • Response
    Response: imkpsrod
    xloslqxl pzyzurut http://uvltvust.com iyzdmfmr piiqcbsn [URL=http://qtwwjqlo.com]sfanqjdv[/URL]
  • Response
    Response: qwijjchh
    fkzcqceb sgyodlkj http://eonvorew.com brxmtepo zesaghwp [URL=http://kuzvwrom.com]vvswsppc[/URL]

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
All HTML will be escaped. Hyperlinks will be created for URLs automatically.