locked
how to upload the list of values in option set?

    Domanda

  • Hi all.

            How to upload the list of values in option set values. My option list of values has containing 3000-4000 its hard to upload the option set through manually.

    Thanks in advance,

    VASU REDDy

    sabato 25 novembre 2017 16:26

Tutte le risposte

  • Do you have 3000-4000 items in your option set?

    If that is the case then you should consider moving the items to a new entity and a lookup field, that would make it easy for you to manage and easy for users to find what they need when entering data in there.

    There is a possibility that the XRM toolbox has something to help you with this.

    Alternatively you could do this by code, following is a bit from the link https://msdn.microsoft.com/en-us/library/gg509025.aspx

    #region How to insert a new option item in a local option set
                        // Create a request.
                        InsertOptionValueRequest insertOptionValueRequest =
                            new InsertOptionValueRequest
                        {
                            AttributeLogicalName = "new_picklist",
                            EntityLogicalName = Contact.EntityLogicalName,
                            Label = new Label("New Picklist Label", _languageCode)
                        };

                        // Execute the request.
                        int insertOptionValue = ((InsertOptionValueResponse)_serviceProxy.Execute(
                            insertOptionValueRequest)).NewOptionValue;

                        Console.WriteLine("Created {0} with the value of {1}.",
                            insertOptionValueRequest.Label.LocalizedLabels[0].Label,
                            insertOptionValue);
                        #endregion How to insert a new option item in a local option set

    Best regards,


    Halldór Jóhannsson


    mercoledì 29 novembre 2017 10:54
  • I agree with Halldor. Consider a new entity.
    mercoledì 29 novembre 2017 20:06
  • I agree with the other respondents in recommending a new entity. I would go so far as to say that adding 3000-4000 items to an option set introduces needless administrative and usability challenges, and could be considered abuse of the option set functionality.
    giovedì 30 novembre 2017 12:56
  • Hi Vasu,

    If you have to use an optionset, you can create an import file with all 4000 alternative options included.

    ie 4000 records with nothing but the option set alternatives.

    When you use the standard CRM import functionality it allows you to automatically create the option sets items based on what is in the import file.

    bit of a hack, but should work. (You can then simply delete the 4000 records.)

    The other comments here are a much better option though.

    regards,

    Don

    giovedì 11 gennaio 2018 00:23