Há alguns dias, uma pessoa fez uma pergunta no fórum MSDN sobre quando utilizar uma Dynamic Entity e suas vantagens e desvantagens, como já possuia algum conhecimento sobre o assunto respondi a pergunta.
Estou estudando para a prova de extensibilidade do CRM (8969A Extending Microsoft Dynamics CRM 4.0) e olhem o que encontrei? Um descrição bem rica de quando e porque utilizar Dynamic Entity, vejam:
A Dynamic Entity consists of an array of strongly typed properties, much like a Property Bag.
Dynamic Entities are used to develop against Microsoft Dynamics CRM entities and attributes that are not defined at design time. This is typically used by developers who write code that will run across multiple installations of Microsoft Dynamics CRM. Most frequently, this includes ISVs and other developers who are developing tools to work with Microsoft Dynamics CRM in multiple implementations.
When to use Dynamic Entities: Use the DynamicEntity class when writing code that must work on entities created after the code is deployed or with attributes added to entities after deployment.
Dynamic Entities are usually used in Plug-ins.
- Advanced Feature: Dynamic Entities are an advanced feature targeted to ISVs and others writing complex code that can be reused in multiple situations. For more information about how to use DynamicEntity refer to: Microsoft Dynamics CRM SDK > Web Services: CrmService > Working with Entities > Using DynamicEntity to Access Entities at Runtime.
- Dynamic Entity Request Classes: The following table lists data retrieval request classes that support the ReturnDynamicEntities flag. A full list of classes can be found at Microsoft Dynamics CRM SDK > Web Services: CrmService > CrmService Execute Method > Request Classes That Can Return the Dynamic Entity Class.