Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Multiselect/Checkbox

(0) ShareShare
ReportReport
Posted on by

Hi everybody!!

I am working in CRM online '15. I need to create a multiselect/checkbox. I have been reading various blogs on the subject, but they are all related about CRM 4 or 2011 (the most current I have found). I am newer in programming/development.

I would like to create a typical checkbox on form but I wouldn't like to create a subgrid ( this option is suggested in some blog/forum)

Can you show me any article to learn to make that? I would appreciate that was updated

Thanks in advance

*This post is locked for comments

  • JMdeSingular Profile Picture
    JMdeSingular on at
    RE: Multiselect/Checkbox

    Thank Deepesh,

    I have one question about your solution. When I select the option, How can I see/store the option selected?( "see" in a text file) I read the manual and I don't find anything about storage selected option.

    Thanks again

  • JMdeSingular Profile Picture
    JMdeSingular on at
    RE: Multiselect/Checkbox

    Should I add any parameters in custom parameters (data) from Property web resource section (General tab) from Property web resource dialog box?

  • JMdeSingular Profile Picture
    JMdeSingular on at
    RE: Multiselect/Checkbox

    Hi,

    I try to make the option HTML web resource and the result was wrong. I capture several pics to show the steps I did. (but I don't know how I show them cause It allows máximum 64 KB)

     

    I add the jQuery 1.11.3 to library form ( I change the path to the new jQuery library in the HTML code)

     

    I edited the HTML code with my custom  attributes:

    (attribute in code) == ( attribute in my code) == ( description ( type field))

    new_makeyear == new_selección == option set field( option set)

    new_selectedyears == new_selección_valores == text storage field(multiline text)

    new_selectedyearstext == new_selección_value == text storage field (multiline text)

    This is the result of code

    <html><head>

        <title></title>
        <script type="text/javascript" src="new_jquery_1.11.3.js"></script>
        <script type="text/javascript">
            function ConvertDropDownToCheckBoxList() {
                var dropdownOptions = parent.Xrm.Page.getAttribute("new_seleccion").getOptions();
                var selectedValue = parent.Xrm.Page.getAttribute("new_seleccion_valores").getValue();
                $(dropdownOptions).each(function (i, e) {
                    var rText = $(this)[0].text;
                    var rvalue = $(this)[0].value;
                    var isChecked = false;
                    if (rText != '') {
                        if (selectedValue != null && selectedValue.indexOf(rvalue) != -1)
                            isChecked = true;
                        var checkbox = "< input type='checkbox' name='r' / >" + rText + ""
                        $(checkbox)
                            .attr("value", rvalue)
                            .attr("checked", isChecked)
                              .attr("id", "id" + rvalue)
                            .click(function () {
                                //To Set Picklist Select Values
                                var selectedOption = parent.Xrm.Page.getAttribute("new_seleccion_valores").getValue();
                                if (this.checked) {
                                    if (selectedOption == null)
                                        selectedOption = rvalue;
                                    else
                                        selectedOption = selectedOption + "," + rvalue
                                }
                                else {
                                    var tempSelected = rvalue + ",";
                                    if (selectedOption.indexOf(tempSelected) != -1)
                                        selectedOption = selectedOption.replace(tempSelected, "");
                                    else
                                        selectedOption = selectedOption.replace(rvalue, "");
                                }
                                parent.Xrm.Page.getAttribute("new_seleccion_valores").setValue(selectedOption);
                                //To Set Picklist Select Text
                                var selectedYear = parent.Xrm.Page.getAttribute("new_seleccion_value").getValue();
                                if (this.checked) {
                                    if (selectedYear == null)
                                        selectedYear = rText;
                                    else
                                        selectedYear = selectedYear + "," + rText
                                }
                                else {
                                    var tempSelectedtext = rText + ",";
                                    if (selectedYear.indexOf(tempSelectedtext) != -1)
                                        selectedYear = selectedYear.replace(tempSelectedtext, "");
                                    else
                                        selectedYear = selectedYear.replace(rText, "");
                                }
                                parent.Xrm.Page.getAttribute("new_seleccion_value").setValue(selectedYear);
                            })
                            .appendTo(checkboxList);
                    }
                });
            }
        </script>
        <meta charset="utf-8">
    </head><body onload="ConvertDropDownToCheckBoxList()">
        <div id="checkboxList">
        </div>
    </body></html>


     Please help me with the process.

    What step do I make wrong?

     

    Thanks in advance

  • Suggested answer
    Deepesh161 Profile Picture
    Deepesh161 6,317 on at
    RE: Multiselect/Checkbox

    Hi Jose,

    I tried the multi select checkbox and works great: dynamicsofdynamicscrm.wordpress.com/.../tool-review-multi-select-field-for-dynamics-crm-20132015

  • JMdeSingular Profile Picture
    JMdeSingular on at
    RE: Multiselect/Checkbox

    Thank Natraj and HIMBAP.

    I will try make your two solutions and I will be updating.

    I appreciate your time

  • Mahendar Pal Profile Picture
    Mahendar Pal 45,095 on at
    RE: Multiselect/Checkbox

    Hi,

    As multi select is not supported by CRM, but you can use html web resource where you can have check box created and then you can place this web resource in entity form.

    Refer: mahadeomatre.blogspot.ae/.../convert-option-set-to-multi-select.html

  • Suggested answer
    NatrajY Profile Picture
    NatrajY 3,040 on at
    RE: Multiselect/Checkbox

    While this is not a checkbox, this solution will accomplish what you want to do. It is called Xrm.Multiselect. Please have a look at ambeknet.wordpress.com/.../xrm-multiselect-quick-manual

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,187 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,966 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans