tags:

views:

17

answers:

1

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?

+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
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
@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