Plugins and update record state: Do I have to use message SetState or SetStateDynamicEntity
One question that came to me while I had to develop a plugin when record state changed...
The answer is quite simple if you understand how the CRM application communicates between the presentation layer and data access layer. In fact, all communications between the forms and the data access layer seem to be in the form of DynamicEntity.
So when you change the status of a record via the forms, or when you use the SDK class SetStateDynamicEntityRequest, you register your plugin on the SetStateDynamicEntity message .
If you use in your code SetStateAccountRequest class (for example), you must register your plugin on the SetStage message.
The answer is quite simple if you understand how the CRM application communicates between the presentation layer and data access layer. In fact, all communications between the forms and the data access layer seem to be in the form of DynamicEntity.
So when you change the status of a record via the forms, or when you use the SDK class SetStateDynamicEntityRequest, you register your plugin on the SetStateDynamicEntity message .
If you use in your code SetStateAccountRequest class (for example), you must register your plugin on the SetStage message.
Comments