Retrieve Entity Information from CRM 2011 Roll Up 12.

Hi,

Now we can retrieve entity information using a SDK method. i.e.. RetrieveEntityRequest

Here is the sample code of it.

RetrieveEntityRequest retrieveRequest = new RetrieveEntityRequest
{
      EntityFilters = EntityFilters.Entity,
      LogicalName = “entityname”
};
RetrieveEntityResponse retrieveEntityResponse = (RetrieveEntityResponse)objService.Execute(retrieveRequest);

EntityFilters is a enum. Here are the values of it.

Enum Description
All Use this to retrieve all data for an entity. Value = 15.
Attributes Use this to retrieve entity information plus attributes for the entity. Value = 2.
Default Use this to retrieve only entity information. Equivalent to EntityFilters.Entity. Value = 1.
Entity Use this to retrieve only entity information. Equivalent to EntityFilters.Default. Value = 1.
Privileges Use this to retrieve entity information plus privileges for the entity. Value = 4.
Relationships Use this to retrieve entity information plus entity relationships for the entity. Value = 8.

Hope this helps.


Happy CRM’ing
Gopinath.
 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s