Wednesday, April 4, 2012

Retrieve Metadata for an Entity in Microsoft Dynamics CRM 2011 Using VB.NET

This illustration shows you how to retrieve metadata for an entity using VB.NET with the RetrieveEntityRequest message against the CRM 2011 organization service.
VB.NET:

Dim req As New RetrieveEntityRequest
req.EntityFilters = EntityFilters.All
req.LogicalName = "account"

Dim resp As RetrieveEntityResponse = DirectCast(slos.Execute(req), RetrieveEntityResponse)



It is important to note that you can filter on the type of entity metadata you want returned since the returned XML document will be very large if you choose EntityFilters.All as shown above.  Your choices are All, Attributes, Default, Entity, Privileges, and Relationships.



Thats all there is to it!

I hope this helps!

No comments:

Post a Comment