Picklist name in Database Table RRS feed

  • Question

  • Dear all,

    i am working in ms crm 4.0. can any one tell me, the picklist name is stored i which table?..
    when we choose some picklist in crm form, it will e stored as integer value in table.can you tell me, in which table i can find the picklist name..
    please help me..


    Monday, February 8, 2010 9:00 AM


All replies

  • I believe you want to  get all the possible values along with the text for a picklist  attribute. you can use the "MetaDataWebservice" for this purpose. you don't  need to access the database.

    here  is an example on how to use "ReteriveAttributeMetaData".

    The following example shows how to use the RetrieveAttribute message to reterive all the information about the  picklist attribute.

    // Create an authentication token.
    CrmAuthenticationToken token = new CrmAuthenticationToken();
    token.OrganizationName = "AdventureWorksCycle";

    // You can use enums.cs from the SDK\Helpers folder to get the enumeration for AD Authentication.
    token.AuthenticationType = 0;

    // Create the metadata Web service;
    MetadataService service = new MetadataService();
    service.Url = "http://<servername>:<port>/MSCRMServices/2007/MetadataService.asmx";
    service.CrmAuthenticationTokenValue = token;
    service.Credentials = System.Net.CredentialCache.DefaultCredentials;
    service.PreAuthenticate = true;

    // Create the request
    RetrieveAttributeRequest attributeRequest = new RetrieveAttributeRequest();
    attributeRequest.EntityLogicalName = EntityName.contact.ToString();
    attributeRequest.LogicalName = "picklistattributename";
    attributeRequest.RetrieveAsIfPublished = true;

    RetrieveAttributeResponse attributeResponse = (RetrieveAttributeResponse)metadataService.Execute(attributeRequest);

    // Access the retrieved attribute
    PicklistAttributeMetadata retrievedAttributeMetadata = (PicklistAttributeMetadata)attributeResponse.AttributeMetadata;
    See Also


    Monday, February 8, 2010 9:04 AM
  • All picklist names you can retrieve from StringMap view.

    Truth is opened the prepared mind

    My blog (english)
    Мой блог (русскоязычный)free countersLocations of visitors to this page
    Monday, February 8, 2010 9:06 AM
  • Hi Andriy,

    Thank you for your reply. As you mentioned, i found the table. its "StringMap" table.


    Monday, February 8, 2010 9:45 AM