retrieve an a global optionset value in ms crm 2011

Proposed Answer retrieve an a global optionset value in ms crm 2011

  • 26 Juni 2012 9:39
     
     

    hello everyone i have an requirement that i want to retrieve an a global option set value from crm to asp.net page 

    guys if now the or some information please paste me its an urgent


    ms crm

Semua Balasan

  • 26 Juni 2012 9:42
     
     Saran Jawaban Memiliki Kode
    Please check the following code
    RetrieveOptionSetRequest req =
     new RetrieveOptionSetRequest
     {
         //my global optionset's name
         Name = "connectionrole_category"
     };
    
    // Execute the request.
    RetrieveOptionSetResponse retrieveOptionSetResponse =
        (RetrieveOptionSetResponse)slos.Execute(req);
    
    
    
    // Access the retrieved OptionSetMetadata.
    OptionSetMetadata retrievedOptionSetMetadata =
        (OptionSetMetadata)retrieveOptionSetResponse.OptionSetMetadata;
    
    // Get the current options list for the retrieved attribute.
    OptionMetadata[] optionList =
        retrievedOptionSetMetadata.Options.ToArray();

    For More help please check the blog of Jamie Miley
    http://mileyja.blogspot.com/2011/07/retrieve-optionset-in-jscript-or-net-in.html

    I hope this helps. If my response answered your question, please mark the response as an answer and also vote as helpful.
    Mubasher Sharif
    Check out my about.me profile!
    http://mubashersharif.blogspot.com
    Linked-In Profile
    Follow me on Twitter!