I need to get either a custom entity's type name (e.g. new_myspecialentity) or its type code (e.g. 1036) form within a custom workflow activity. Is there anyway to do this?
views:
17answers:
1
+1
Q:
How can I get the entity type code (or name) for the primary entity in a custom workflow activity?
+2
A:
From the IWorkflowContext, you can use the PrimaryEntityName property to get the logical name. A sample and other more descriptions can be found in Microsoft Dynamics CRM Blog.
benjynito
2010-08-20 01:06:01
Thanks. I was confused about the PrimaryEntityName attribute. I thought it would be the instance name since the PrimaryEntityID was GUID for the instance of the entity.
Greg McGuffey
2010-08-20 18:03:17
@greg NP, regarding your other question (constructor configuration) - i don't think so. But feel free to give it a try and let us know. Never tried myself. I'm not sure how dependency properties play (instance members or not), since you can't have (class) instance members within your plugins (because your plugin is created once and used many times).
benjynito
2010-08-20 18:29:05