开发者

CRM 2011 Workflow Condition Issue

开发者 https://www.devze.com 2023-04-09 00:11 出处:网络
I have created a simple workflow in CRM 2011 which checks a field value in one entity and creates a new record in a different entity. Sometimes however, the creation doesn\'t occur, it just seems that

I have created a simple workflow in CRM 2011 which checks a field value in one entity and creates a new record in a different entity. Sometimes however, the creation doesn't occur, it just seems that the condition is not met when it should be.

开发者_运维问答Consider an entity called "Car" which has a text field called "Task". This Task field will always be saved with 1 of 4 possible values: "", "Add", "Change", "Delete".

This value is used to determine how the workflow should process.

The workflow is set to fire when a different field is changed - "Driver".

The workflow is setup like this...

- Condition
   - If "Task" == "Add"
      - create new record
   - Else if "Task" == "Change"
      - create new record
   - Else if "Task" == "Delete"
      - create new record
- Reset "Task" to ""

NOTE: the created record is using different values depending on "Task"

I can see that the workflow is always fired when expected, and both the "Condition" and the "Reset" are processed. The problem is that sometimes (although, not so far today) no record is created - this suggests that none of the IF conditions are met. However, I have no reason to explain why. I can see that the field "Task" is always set as expected prior to the save (exact spelling/casing and all)

So, are there any known issues with CRM workflows that could explain this? Is there a more indepth way to debug these issues? (i.e. check the value of "Task" at time on "Condition" checks)

I am wondering is it possible that the "Reset" part of the workflow is somehow being processed before the condition? and there for the condition is checking a blank field.

Any help will be greatly appreciated, Thanks


Unfortunately, I have not experienced this issue again since the first time when I created the workflow.

However, some good techniques where offered in comments as to how this sort of issue could be debugged - thanks to those people!

Firstly, you can turn on Entity Auditing which will help you track down what is going wrong.

Another option would be to send an email from the workflow with the current data values for debugging, or add a final "else" clause to send emails when none of the conditions have been met (perhaps a good fail safe addition to have even when it does seem to all be working) - I like this second option as it is more "out of the box" thinking ;)

Anyway here you can find information on sending emails from within a CRM workflow

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号