Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Custom multi-select lookup webresource

Posted on by Microsoft Employee

I want to create a lookup field in which multiple options can be selected.

I dont want to do this using subgrid work around.

Can any one help with web-resource with multiselect dropdown?

*This post is locked for comments

  • Steve Le Monnier Profile Picture
    Steve Le Monnier 924 on at
    RE: Custom multi-select lookup webresource

    I'm afraid the multi-option set was exactly that. Taking an Option Set and making it a multi-option set. What you're asking for is significantly different.

    Have you thought about creating a many-to-many relationship between the primary entity and the entity holding your lookup values?

    You could do this and then put a small grid on the form which would give you a multi option lookup to an entity.

    I did this recently so I can associate various hash tags to contacts and accounts in crm.

    Other than this I know no other quick resolution to your issue.

    Good luck

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Custom multi-select lookup webresource

    @Steve I want multi option set to take values from another entity. In Dynamics CRM multi option set has fixed values, I want those to be look up values. If your solution do the same could you plesae share it.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Custom multi-select lookup webresource

    @Goutam Das, we cannot retrieve the selected values(in subgrid kind of multi select field) in quick view form or for any other validations

  • Steve Le Monnier Profile Picture
    Steve Le Monnier 924 on at
    RE: Custom multi-select lookup webresource

    As others have alluded too, the online version of CRM supports multi-select options sets. I've used them with V9 and they are really cool.

    I have also "rolled my own" multi-option set since CRM 2013 despite it not being supported. My advice would be to stick to the supported methods now available, or do a child entity. However, if you wanted to roll your own, the process is simple (if somewhat unsupported).

    There are blogs online that explain, but for each option-set you have, you need to create a long enough string value to go with it. Then in java-script you override the drop-down control by adding tick-boxes to the options available, and then when you save the record, your save code has to walk through each option in the list that has been ticked and transfer the values to the string field with semi-columns (;) between each value. When your CRM form loads you read the string value and then walk the drop-down list ticking we option that was set.

    It was a fudge back then, but worked... the new Microsoft version is much much better I would recommend that always.

    Good luck

    Steve

  • gdas Profile Picture
    gdas 50,085 on at
    RE: Custom multi-select lookup webresource

    I don't see any reason to go with custom webresource for your requirement ,  may I know any difficulty you are facing with OOB solution that is  adding subgrid. I would still encourage to go with subgrid to avoid custom code and additional page loading time, In addition using  custom webresource you might face lot of challenges  with unified interface as well.

    Please share your scenario why you want to go with html webresource?

  • Suggested answer
    Kokulan Profile Picture
    Kokulan 18,048 on at
    RE: Custom multi-select lookup webresource

    Hi

    Since you are on CRM Online, it's definitely worth having a look at using the new lookup dialog launching options, it allows doing multi-select as well

    community.dynamics.com/.../open-lookup-dialog-programmatically-using-xrm-utility-dynamics-v9-0

    butenko.pro/.../microsoft-dynamics-365-v9-0-lookupobjects-closer-look

    The main benefit of the above is usability. Users are familiar with the lookup dialog throughout the system.

    But if you do not want to go for this option, let us now we should be able to point you towards a custom web resource option

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,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans