Robert MacLean
29 February 2008
(This is a repost of the content which was previously available on the IW community site)
Here is an interesting effect which I was solved recently, namely when an item in MSCRM was created the assign event (both callout and workflow) would fire twice. This was very odd and great lengths were taken to track it down, using the MSCRM trace tool, various tests etc… But since this was one instance of the problem which could not be replicated at other sites it was eventually shelved until more important issues were resolved.
This issue only occurred during creations from outside sources (namely my code) and didn't happen if you created the item in the MSCRM interface. But this was normal code where I created the item, set the properties and passed it to the Create method. Nothing fancy here. The issue was that I couldn't see the trees because of the forest, namely I was setting the ownerid parameter as one of the parameters.
What this was doing internally was causing the assign to fire when the item was created and then to cause a second assign to fire to handle the ownerid. Removing that one line of code fixed the issue up immediately.
Here is an interesting effect which I was solved recently, namely when an item in MSCRM was created the assign event (both callout and workflow) would fire twice. This was very odd and great lengths were taken to track it down, using the MSCRM trace tool, various tests etc… But since this was one instance of the problem which could not be replicated at other sites it was eventually shelved until more important issues were resolved.
This issue only occurred during creations from outside sources (namely my code) and didn't happen if you created the item in the MSCRM interface. But this was normal code where I created the item, set the properties and passed it to the Create method. Nothing fancy here. The issue was that I couldn't see the trees because of the forest, namely I was setting the ownerid parameter as one of the parameters.
What this was doing internally was causing the assign to fire when the item was created and then to cause a second assign to fire to handle the ownerid. Removing that one line of code fixed the issue up immediately.