Skip to main content
Dynamics 365 Community / Forums / Sales forum / Creating Multi-select ...
Sales forum
Answered

Creating Multi-select lookup field

editSubscribe (0) ShareShare
ReportReport
Posted on by 190

Hey,

What I'm trying to do is create a reference field where you can select up to 3 accounts at once. So it is really a combination of a lookup field and a multi-select.

We want to be able to search for accounts and select 3 of them in the one field at opportunity level. We know there is an option of creating 3 separate reference fields but we would prefer to create one.

Is this possible?

Thank you in advance

Attachments
  • LuHao Profile Picture
    LuHao 40,834 on at
    RE: Creating Multi-select lookup field

    Hi partner,

    Glad it was resoved.

    Please click Yes under "Did this answer your question?". Thanks.

  • dynamicsgs Profile Picture
    dynamicsgs 190 on at
    RE: Creating Multi-select lookup field

    Ok we have now got this working. Thank you all for your help, greatly appreciated.

  • Verified answer
    LuHao Profile Picture
    LuHao 40,834 on at
    RE: Creating Multi-select lookup field

    Hi partner,

    We should create the intersect entity of N:N relationship manually, so that we can use this entity in the report.

    First please read this blog to know how to create the intersect entity of N:N relationship: https://carldesouza.com/understanding-intersect-entities-and-nn-relationships-in-dynamics-365/

    For the chart, Piyush has shared the solution. Let me talk about how to create a report.

    First we have to create an intersect entity, it has two lookup fields, one is for Account, the other is for Opportunity. Add both lookup fields in the form and view.

    pastedimage1615542547869v1.png

    pastedimage1615542576024v2.png    pastedimage1615542595197v3.png

    Then insert a sub-grid of the intersect entity in both Account form and Opportunity form. So that you can see both sub-grid as the N:N relationship.

    When we would add Accounts into Opportunity, new a record for the intersect entity sub-grid, then select an Account in the lookup field.

    pastedimage1615542901514v4.png

    pastedimage1615542933690v5.png

    Next is to create a report.

    pastedimage1615543007455v6.png

    pastedimage1615543125960v9.png

    Group:

    pastedimage1615543063491v7.png

    Column:

    pastedimage1615543093238v8.png

    Result:

    pastedimage1615543245968v10.png

  • Suggested answer
    ChangeFrenzoId Profile Picture
    ChangeFrenzoId 465 on at
    RE: Creating Multi-select lookup field

    Hey!

    You can create charts on N:N related records, please follow below link:

    https://crmchartguy.com/2014/11/05/nn-relationship-charts-in-ms-dynamics-crm/

  • dynamicsgs Profile Picture
    dynamicsgs 190 on at
    RE: Creating Multi-select lookup field

    Hi Lu,

    Thank you for this. I have now created the relationship and I can add multiple accounts into the subgrid. The only other thing I am unsure on is how to report on these accounts?

    Example Lets say Dynamics Ltd were a reference in this subgrid under 4 opportunities and Microsoft Ltd were selected in this reference subgrid 6 times, we want to create a chart showing Microsoft have been used as a reference 6 times and Dynamics 4 times. How is this report created?

    Thanks again for your help

  • Suggested answer
    LuHao Profile Picture
    LuHao 40,834 on at
    RE: Creating Multi-select lookup field

    Hi partner,

    I would recommend you create a N:N relationship sub-grid instead of multi-select lookup field.

    The multi-select lookup field does not conform to the D365 data structure, and even if you create it, I believe the multi-select lookup field will not display perfectly on views and reports.

    So the supported function of D365 to relate multiple records of another entity for a record is the N:N relationship sub-grid.

  • Suggested answer
    Fubar Profile Picture
    Fubar 2,748 on at
    RE: Creating Multi-select lookup field

    Create a many-to-many relationship between Account and Opportunity and then put a Subgrid on Opportunity showing the Accounts (if you still need an easier interface, then you would need to create a PCF Control or custom Web Resource to simplify the adding but you would sill need the many-to-many relationship).

    Haven't used it myself and haven't checked what licencing they have but here is one example (and a link to the PCF Gallery with other controls):

    pcf.gallery/.../

    pcf.gallery/categories to many

Helpful resources

Quick Links

New Blog Features Released!

Check out the new community blog features for viewers and authors…

Setting Up Knowledge Sources for Copilot…

Look at how configuring a comprehensive knowledge base is crucial…

Demystifying Copilot with Georg Glantschnig…

Industry experts answer burning questions directly from our amazing Community…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,166 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 222,703 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,138

Featured topics

Product updates

Dynamics 365 release plans