Search This Blog

Sunday, November 22, 2015

Get Entity type Code in CRM plugin code

If you have any doubt in the post please post comments. I will try to solve your problem.

In CRM each entity has separate object/entity type code. You can also get entity/object type code through plugin.          

Plugin Code:
 RetrieveEntityRequest request = new RetrieveEntityRequest();
 request.LogicalName = entity name;

// Retrieve the MetaData.
RetrieveEntityResponse response = (RetrieveEntityResponse)service.Execute(request);
int iEntityTypecode = response.EntityMetadata.ObjectTypeCode.Value;



No comments:

Post a Comment

Note: Only a member of this blog may post a comment.