Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Answered

Hierarchy-/TreeView-Lookup

Posted on by 55

Hi,

I'm evaluating Dynamics CRM/PowerApps and if I got it right, there is (still) no way to display a treeview as a lookup for hierarchical data (e.g. Product).

Our hierarchies are sometimes deeply nested and contain hundreds of entities. Therefore just displaying a flat list does not work very well. I think someone suggested a PCF treeview control a while ago, but no one answered.

I checked whether it is possible to implement it on my own, but according to the Power Apps Community, it is not possible yet.

Is it really not possible to use treeviews as lookups? How do you deal with this situation in Dynamics CRM? I think large hierarchies are quite common.

Thank you!

  • Costeri Profile Picture
    Costeri 15 on at
    RE: Hierarchy-/TreeView-Lookup

    We at DAF Trucks are also searching for this possibility. I find it strange that this very user friendly presentation mode is not available for the users, to choose/ select a product.

    I hope MicroSoft will make this available on very short notice

  • Sharath123 Profile Picture
    Sharath123 15 on at
    RE: Hierarchy-/TreeView-Lookup

    Did you find the solution for Heirarchy to be displayed on lookup. We have similar kind of requirement on one of our custom lookup. Can you please guide me with the approach you followed?

    krombi

  • krombi Profile Picture
    krombi 55 on at
    RE: Hierarchy-/TreeView-Lookup

    I'm now using some (deprecated) Xrm methods to get information about DependentAttributeType and so on and us this information to build a filter for webAPI.retrieveMultipleRecords query. Seems to be working fine.

    I guess/hope we will get better APIs/Documentation when Lookup.Simple is officially supported (in release wave 2?)

  • Carlo Velasco Profile Picture
    Carlo Velasco 787 on at
    RE: Hierarchy-/TreeView-Lookup

    If you have questions on how to use the Client Api Object Methods, please refer.

    docs.microsoft.com/.../reference

    If you have a question with one Method in particular, just let us know or create a Microsoft Support Case, and we will be happy to help you.

  • krombi Profile Picture
    krombi 55 on at
    RE: Hierarchy-/TreeView-Lookup

    I found this question and used the workaround for unsupported Lookup.Simple from @AndrewButenko. Actually this is working fine!

    I'm currently using context.webAPI.retrieveMultipleRecord(...) to retrieve the records for my treeview pcf control. I can render jstree treeview (and also select lookup values), but it always displays all entities, because the filtering defined in the form for the lookup is not applied and I don't know, how to retrieve the correct filter. There is e.g. a context.parameters.controlValue.sendLookupRequest()  and also context.parameters.controlValue.filtering, but it lacks documentation and I can't get it to work.

    Any advice?

  • Verified answer
    Carlo Velasco Profile Picture
    Carlo Velasco 787 on at
    RE: Hierarchy-/TreeView-Lookup

    Hi

    Currently this is not possible in Dynamics CE.

    The current approach is to add one lookup for each level of the hierarchy.

    For example, in a two level hierarchy:

    Two lookups will be added to the form, and the child lookup will be filtered by the parent lookup.

    Please take a look at this post.

    https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/150758/filtered-parent-lookup

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 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