Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Commerce forum / Restrict the display o...
Commerce forum
Unanswered

Restrict the display of organization hierarchy nodes which doesn't consists Retail Channels/Stores as child

Posted on by 135

Hi Team,

I had a requirement to restrict the Organization hierarchy display on the Form i.e. Entire tree structure node needs to be ignored if that node doesn't consists of retail channel.

For example: Please refer the below sample setup done in organization hierarchy (Highlighted nodes doesn't have any retail channels).

Now my requirement was to ignore the display of entire nodes i.e. "East" (i.e. East & IT Department) and "West". 

Added new condition ignoring "WEST" node & "IT Department" nodes only because when standard code was traversing through each node  added the condition to check whether that node consists any child/not if that was not there this was ignored.

I have duplicated the standard class [RetailInternalOrgTreeDatasource] and added some conditions as this entire customization was Legal Entity Specific.

Class    - RetailInternalOrgTreeDatasource

Method - getOrgTreeData

Please refer condition  added to the above mentioned method in the attachment file highlighted in UPPERCASE:- (added code in while loop).

Added new condition  ignoring entire "WEST" node & "IT Department" nodes only.[View:/cfs-file/__key/communityserver-discussions-components-files/797/6404.getOrgTreeData_5F00_Method.txt]

8306.OrgHierarchy.PNG

Highlighted One's are not Retail Channels/Stores 

With new customized Condition in the code:-

6648.StoreHierarchyHide.PNG

  • krishna srikanth Profile Picture
    krishna srikanth 135 on at
    RE: Restrict the display of organization hierarchy nodes which doesn't consists Retail Channels/Stores as child

    Hi Ramune,

    Yes both are pointing/seeking the same solution. Once we get solution in any one of the blog we will delete another/Unanswered post.

    Thanks & regards,

    Krishna srikanth M.

  • Ramune Profile Picture
    Ramune on at
    RE: Restrict the display of organization hierarchy nodes which doesn't consists Retail Channels/Stores as child

    Hi Krishna,

    it seems you continue the same topic as it was mentioned in another community thread:

    community.dynamics.com/.../hide-organization-hierarchy-nodes-where-retail-stores-are-not-part-of-current-legal-entity

    I will leave this for the community to answer. Let's see if anybody has experienced the same and can advise for you anything. If this is a requirement to have in standard, please create an Idea in Ideas portal:

    experience.dynamics.com/.../

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,914 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,549 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans