When you open a form and deactivate the record, it is the SetStateDynamicEntity that is called. You can register it on both events SetStateDynamic and SetState but only one of them is called at a time.
EntityMoniker is nothing but EntityReference and to read the entitymoniker you can use
EntityReference ref = context.InputParamters["EntityMoniker"] as EntityReference.
The entity reference will provide you with the Guid and Object type code of the entity which with it is associated.
HTH
Sam
Dynamics CRM MVP |
Inogic | http://inogic.blogspot.com|
news at inogic dot com
If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"