CRM 4 – Dynamics Entities


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:

Dynamic Entities


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.
Em resumo, devem ser utilizadas em codificações complexas para manipular informações em tempo real, ou que envolvam multiplas organizações, gerando aproveitamento de código. E por fim para consumir métodos nativos do CRM como o ConvertQuoteToSalesOrderRequest.

Vale a pena aprofundar o assunto…

Deixe um comentário

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logo do WordPress.com

Você está comentando utilizando sua conta WordPress.com. Sair /  Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair /  Alterar )

Conectando a %s

Este site utiliza o Akismet para reduzir spam. Saiba como seus dados em comentários são processados.