Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

checkbox items to multi select option list

Posted on by 524

Hi,

I am creating an aspx page from which i have to pass data to CRM portal using organization service. I am having checkbox items which should be pass the selected items to an entity having the field multi select option list. Can you please suggest me how to do that ?

*This post is locked for comments

  • Anandhcrm Profile Picture
    Anandhcrm 524 on at
    RE: checkbox items to multi select option list

    I am having one more query...

    I am inserting records to Account entity. I am having few contact details associated with each account which should be inserted into Contact entity. I have created lookup field for account in Contact entity. From aspx page, how I can achieve this...

  • Anandhcrm Profile Picture
    Anandhcrm 524 on at
    RE: checkbox items to multi select option list

    It worked perfectly. You are great... Thank you so much :)

  • Suggested answer
    Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: checkbox items to multi select option list

    If you are on Dynamics 365 v9 (since you are using multiselect option sets), you should use the v9 sdk.

    See the link below to download sdk:

    docs.microsoft.com/.../download-tools-nuget

    You can also get the tools from github already prepackaged:

    http://xrm.tools/SDK

    Hope this helps.

    Aric

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: checkbox items to multi select option list

    Yes you should use v9 and .net framework 4.6

  • Anandhcrm Profile Picture
    Anandhcrm 524 on at
    RE: checkbox items to multi select option list

    Thanks for your suggestion. I think OptionSetValueCollection available in sdk v9.0. But i am using sdk v8.2. Is it possible to download v9 dll ?

  • Suggested answer
    Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: checkbox items to multi select option list

    See the following link on updating multiselect optionset:

    docs.microsoft.com/.../multi-select-picklist

    The logic is as follows::

    OptionSetValueCollection activities = new OptionSetValueCollection();

    activities.Add(new OptionSetValue(1)); //Swimming

    activities.Add(new OptionSetValue(9)); //Camping

    Contact contact = new Contact();

    contact["firstname"] = "Wayne";

    contact["lastname"] = "Yarborough";

    contact["sample_outdooractivities"] = activities; // multiselect optionset

    _serviceProxy.Create(contact);

    Hope this helps.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans