Count Of Attributes of an entity in CRM RRS feed

  • Question

  • Hi Friends,

                       How it is possible to find out the number( count)  of attributes of a particular entity in CRM using crm metadataservice? Thanks in advance.

    I know the code for retrieving entitty attributes


    Thursday, August 5, 2010 10:52 AM


All replies

  • you should be able to check it after RetrieveAttribute request through it's count property.
    Mahain : http://mahenderpal.wordpress.com
    Thursday, August 5, 2010 10:59 AM
  • Pls explain me..this is my code for retrieving attributes for an entity(here account)..How can found out count?

    RetrieveEntityRequest entityRequest = new RetrieveEntityRequest();

                entityRequest.LogicalName = "account";
                entityRequest.EntityItems = EntityItems.IncludeAttributes;

                RetrieveEntityResponse entityResponse = (RetrieveEntityResponse)metadataService.Execute(entityRequest);


    Thursday, August 5, 2010 12:16 PM
  • entityResponse.EntityMetadata.Attributes.Count (or .Length, can't remember)
    My blog : http://mscrmtools.blogspot.com

    All my tools on my new dedicated site: MSCRMTools Repository
    Thursday, August 5, 2010 12:20 PM
  • It shoud be entityResponse.EntityMetadata.Attributes.count
    Mahain : http://mahenderpal.wordpress.com
    Thursday, August 5, 2010 12:37 PM