Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

Updating MultiSelect Option Set Values

  • 1.  Updating MultiSelect Option Set Values

    TOP CONTRIBUTOR
    Posted 8 days ago
    Hi all,
    We are on Dynamics 365 Online CE v9x.  I've received 2 requests relating to the MultiSelect Option Set.

    1) Expand the field to show all the selected options.  When 8 or 9 categories are selected, the rest are cut off as per below.  I've added a spacer below the field which made a small amount of difference.


    With Multiple Lines of Text fields, you can set the number of rows and allow the field to automatically expand to use available space.  Unfortunately these options don't exist on the MultiSelect Option Set.  We've already moved it to sit in a column with a larger width.  Ideally we don't want to create a new tab with 1 column as this would push the field too far down the form.  Can anyone think of anything else I can do to make the field bigger?


    2) Make 3 options appear at the top of the list and also appear in the same order as below when selected.  These are the most used categories and also helps users if they can see these categories when viewing the contact record without having to hover over the field or select the field.  I changed the order of the fields...


    ...and when I select the fields they appear in the required order...


    ...until I click out of the selection, then it defaults to alphabetical order, or so I thought.


    After playing around a bit more, I realised it is displaying the options by the order of the Value field.


    I've always been told not to mess around with the Values but wanted to check again to see what my options are before I go back to the user who requested the change.

    I updated one of the Values and then transported it into another sandbox environment, this created a duplicate option which we don't want.

    Is there a way to recreate the options with the required Values so that the 3 fields are in the correct order but also retain the categories that have already been selected on contacts so from a users point of view, it is seamless?

    Any other suggestions greatly appreciated.

    Thanks.

    ------------------------------
    Mark Aston
    Data Analyst
    Ordnance Survey
    Southampton, UK
    ------------------------------
    CRMUG Summit - Post


  • 2.  RE: Updating MultiSelect Option Set Values

    TOP CONTRIBUTOR
    Posted 5 days ago
    Mark

    This would require some serious js dom manipulations. Yes, I know it is not recommended, but if your boss requires it then this is your only choice.

    Expand field
    I would suggest using the standard apis to determine if the control exists first. Once that is done, you can use standard dom manipulation to change the div property rowspan.

    Top options
    You have to hard code the top three somewhere. Once you get the options, recreate that array by adding top 3 first and adding the rest.

    Cheers!

    ------------------------------
    Rex Kenley Tan, MCSA: Web Applications
    Tallmadge OH
    https://www.youracclaim.com/users/rex-kenley-tan

    *Always be CURRENT with JavaScript & C#, NEVER be obsolete.

    DISCLAIMER: All views expressed on this site are my own and DO NOT represent the opinions of ANY entity whatsoever with which I have been, am now, or will be affiliated.
    ------------------------------

    CRMUG Summit - Post


  • 3.  RE: Updating MultiSelect Option Set Values

    TOP CONTRIBUTOR
    Posted 5 days ago
    Mark,

    I'm not sure if you can import a multi-select field, if you can I would try to add all new labels and values in the order you require in the drop-down.  I would append the labels with "_new" for example "option1_new", so every list label is unique, for the value you may be forced to start with 124,150,000 (if not start there anyway), leave 100 between each entry, just in case the Users come back with more options.   Then export 3 columns from your entity, the multi-select field, status, and 1 other field of your choice.  In excel, search and replace each option1 with option1_new and so on and import.  I've had a lot of luck importing against inactive records as long as they were not merged.  If there are records that do not update then you have to make a choice, do them manually or let the existing values be removed.  Then go back to the option set and delete the old label/values and remove the "_new" from the other labels.

    Hope this helps,


    ------------------------------
    Jim Corriveau
    A.W. Chesterton Company
    Groveland MA
    ------------------------------

    CRMUG Summit - Post


  • 4.  RE: Updating MultiSelect Option Set Values

    GOLD CONTRIBUTOR
    Posted 5 days ago
    It's possibly not an option for you right now, but I think the "correct" way of doing this sort of UI customisation as you move to Unified Interface is to create a PCF control, then you have complete control over the HTML being produced for your field without any unsupported DOM manipulation. Unfortunately you can't use this on the classic web UI though, but one to bear in mind for the future.

    ------------------------------
    Mark Carrington
    Chief Technologist
    Data8
    Chester
    ------------------------------

    CRMUG Summit - Post


  • 5.  RE: Updating MultiSelect Option Set Values

    TOP CONTRIBUTOR
    Posted 4 days ago
    Mark

    What does PCF stand for?

    ------------------------------
    Rex Kenley Tan, MCSA: Web Applications
    Tallmadge OH
    https://www.youracclaim.com/users/rex-kenley-tan

    *Always be CURRENT with JavaScript & C#, NEVER be obsolete.

    DISCLAIMER: All views expressed on this site are my own and DO NOT represent the opinions of ANY entity whatsoever with which I have been, am now, or will be affiliated.
    ------------------------------

    CRMUG Summit - Post


  • 6.  RE: Updating MultiSelect Option Set Values

    GOLD CONTRIBUTOR
    Posted 4 days ago
    PCF is the PowerApps Component Framework. It's currently in public preview:

    https://docs.microsoft.com/en-us/powerapps/developer/component-framework/overview

    There's some great example controls that the community have built already here:

    https://pcf.gallery/

    ------------------------------
    Mark Carrington
    Chief Technologist
    Data8
    Chester
    ------------------------------

    CRMUG Summit - Post


If you've found this thread useful, dive deeper into User Group community content by role