locked
CRM 2011 Retrieve all optionset RRS feed

  • Question

  • Greetings.

    I found an MSDN article about retrieving all Global OptionSet.
    Is it possible to do the same for NON Global OptionSet (retrieve not one but all of them: integer code + text)?

    Thanks,


    Frank


    • Edited by FrkM Wednesday, December 17, 2014 12:03 AM
    Wednesday, December 17, 2014 12:02 AM

Answers

All replies

  • if you want the local optionsets you need to query for all the entities metadata and check the attribute type of the fields

    My blog: www.crmanswers.net - Rockstar 365 Profile

    • Marked as answer by FrkM Thursday, December 18, 2014 12:47 PM
    Wednesday, December 17, 2014 5:05 AM
  • Hi Frank,

    If you know how to retrieve all Global OptionSet, you can change current optionset as a Global OptionSet.

    Also, you can check the function below:

    function getOptionSetAttr()
    {
    var accountid = Xrm.Page.getAttribute('customerid').getValue()[0].id;
    
    var columns = ["new_optionset1"];
    var retrievedattr = CrmServiceToolkit.Retrieve("account", accountid, columns);
    alert(retrievedattr.getValue('new_optionset1'))
    }

    It gets a non-global optionset in the form.

    For more information, please refer to:

    How to retrieve optionset value from other entity using CRMRestKit?

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Edited by George Hua Wednesday, December 17, 2014 5:46 AM
    Wednesday, December 17, 2014 5:46 AM