Add description for each pick list value RRS feed

  • Question

  • Hi All,

    The client I am working for wants to display a "description or explanation" for each pick list value on a form.  The client is convinced that the end user would need this in order to make the proper selection.  I am curious to see how some of you may have implemented this.


    Friday, August 15, 2014 2:02 AM

All replies

  • You can create an HTML webresource to put beside your optionset field, when an option is selected, a text is displayed inside this webresource.

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

    Friday, August 15, 2014 3:21 AM
  • There are a few options you can choose from. This type of requirement usually incurs the following:

    1 . Storage: Where to keep the description information

    2.  Retrieve: How to get the data to the form

    3.  Show: How to present the description on the form.

    Regarding storage you can do the following:

    1.        Create another optionset on the same form.
      1.        Pros:  
        1. i.      Fast
        2. ii.      Simple to retrieve
        3. iii.      Supports translations
      2.       Cons:
        1. i.      Requires a customizer to add, remove ,change descriptions
        2. ii.      UI is not the most comfortable to work with.
    2.        Create an entity to hold the description information.
      1.        Pros: 
        1. i.      Customer can add , delete , change values
        2. ii.      UI is configurable and easy to use.
        3. iii.      Support translations
      2.       Cons:
        1. i.      less simple to retrieve info to the form
        2. ii.      Slower solution.
    3.        Put the description in your code
      1.        Pros:
        1. i.      Fast
        2. ii.      Simple to retrieve
      2.       Cons:
        1. i.      Requires a programmer to make changes
        2. ii.      Does not support translations
    4.        Read the description from a configuration entity
      1.        Pros:
        1. i.      Better configuration control
        2. ii.      Power user can make changes
      2.       Cons:
        1. i.      Does not support translations
        2. ii.      Slower solution

    Regarding retrieval of data:

    1.        If it’s a script or another optionset then it’s already a part of your form and it’s easier to code.
    2.        If it’s stored elsewhere you need to use ajax or a webresource to load the data.

    Regarding how to show the data:

    1.        Create a javascript tooltip
      1.        Pros: The most divers solution
      2.       Cons: Unsupported , Require good JS skills
    2.        Change the optionset title (alt) value
      1.        Pros: Easy to implement
      2.       Cons: Not supported, Not a pretty GUI.
    3.        Write it as a form notification
      1.        Pros: Easy to implement, Supported
      2.       Cons: The description appear on the top of the form and not near the optionset.
    4.        Write it on the field’s label
      1.        Pros: Easy to implement, Supported
      2.       Cons: Not a pretty GUI.
    5.        Write the value into another text field beside the optionset.
      1.        Pros: Easy to implement, Supported
      2.       Cons: Not a pretty GUI
    6.        If you chose to hold the data in another optionset you can display that disabled.
      1.        Save as 4
    7.        Finally you can use a web resource as Guido suggested.
      1.        I’ll let Guido elaborate on this if you’re interested in this type of solution.

    I would personally go with:

    Storage: 1

    Retrieve: 1

    Show: 3 (and clear the notification after several seconds using JS).


    Dev Blog: Dynamics CRM - Thinking outside the Box

    Friday, August 15, 2014 3:20 PM
  • Hi Mego,

    I do not like the solution that I am proposing. But you can try some unsupported changes.

    function onFocus() {
        Xrm.Page.getControl("rio_nameoninviteletter").setNotification("Name On Invite Format is Mrs. & Mr. Full Name!", "rio_nameoninviteletterCustom");
    function onBlur() {
    // And inside Form_OnLoad
     var n = document.getElementById("rio_nameoninviteletter_i")
            if (n != null) {
                n.onfocus = onFocus;
                n.onblur = onBlur;

    Output is as shown below. you may have lot more work to do in your case.

    I like Guido's solution best. 



    Monday, August 18, 2014 4:46 AM