Workflow - The field on type does not exist
If you are using a code separated workflow and get the following error:
Activity validation failed: Property "Condition" has invalid value. Condition expression is invalid. The field on type does not exist or is not accessible.
It's because they don't have variables created for the activities like code workflow's.
So if in a rule for example you try to use the following syntax
this.testActivity1.Field1 == true
You will get the above error....it will drive you crazy until you try the following syntax
((ActivityNamespace.ActivityName)this.GetActivityByName("testActivity1")).Field1 == true
Thanks to Tom Lake @ Microsoft's post on this forum thread
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=947441&SiteID=1
That's kind of ugly.... Hopefully this is on someone's list to clean up a bit!
Reader Comments