Wednesday 20 February 2013

Triggering Workflows in Ms Dynamics CRM 2011

Yesterday I was looking at an issue where we were getting two accounts created for each of our callbacks (a custom entity) under certain circumstances.

It turns out that if you have a dialog, workflow or plugin that updates a field, even if the update is to set the field to the same value that it had before, this will trigger any workflows that are watching that field.

The solution is simple, only make the update if it's needed, i.e. check the value before you do the update, but it's perhaps a little bit counter-intuitive as the field has not actually changed.

If you have auditing enabled, you'll be able to see how a change is registered from value to value [sic].

No comments:

Post a Comment