web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
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

I have the same question (0)
  • Suggested answer
    NatrajY Profile Picture
    3,040 on at

    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

  • Mahendar Pal Profile Picture
    45,095 on at

    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

  • JMdeSingular Profile Picture
    on at

    Thank Natraj and HIMBAP.

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

    I appreciate your time

  • Suggested answer
    Deepesh161 Profile Picture
    6,317 on at

    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
    on at

    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

  • JMdeSingular Profile Picture
    on at

    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
    on at

    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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans