Hello everyone,
I want to create a dynamic navigation menu on my CRM Portal and there are some sublinks that I want to show only if the user has a certain web role, the parent link will be always visible.
Can anyone help me achive such thing?
Many thanks in advance,
Irena.
*This post is locked for comments
Thanks everyone for your suggestions and help!
I am approving the answer from Mohd Saad Akhtar because to me for some reasons the web access control didn't work and I made sure that wasn't a cache related issue.
However, I did not applied JS but I took a closer look to the Header template to see where the sublinks were assigned and modified this liquid by adding few conditions and finally I have the result that I want.
Really want to understand why web access control was not working, as well the {{user.roles}} [mentioned on the suggested link] returns me the entire list of web roles and not the roles assigned to the logged user.
Many thanks once again!
Hi,
I think it's possible to hide child links using web access control rules with proper web roles. It worked for me. The above blog is saying "few links available on the portal that you cannot hide/show using access rules due to its own limitation. Forum link is one of them." I did try on all links. See below images which are from taken my demo environment.
Thanks
Justin Jose
It's not possible to hide child links using web access control rules. I suggest you use JavaScript for this. i have implamented this and it works fine for my portal.
Refer this:
arpitmscrmhunt.blogspot.sg/.../remove-forums-link-from-crm-portal-main.html
Hi Ira B,
You can achieve this through Web page access control rules, for example
Parent Link is Customer and two child link, Customer Contacts and Customer Account. Assign Restricted Read Rights to child , then add web role to show links based on role. Also add web roles for the contact.
Thanks
Justin Jose
Ira,
I have found that setting up the Web Page Access Control Rules may required a clear of the cache, or even a restart of the portal. For some reason the rules don't get pulled to the portal right away. A restart should bring them in.
Unfortunately it's just a "keep trying" sort of scenario.
Hi Ira,
Please ignore my suggestion as I assumed it was for Dynamics 365 UI.
Hello,
Thanks for the response!
I have created the web page access control rule but is not affecting as should and my sublinks are always visible no matter the logged user role.
Hi Ira,
To change the navigation in the portal you will have to utilize Web Page Access Control Rules. This can be found inside CRM under the Portals area.
You will have to create a control rule for each page or sublink you would like to hide. Once you create the control rule and link it to the webpage, you can set the "Right" as Restrict Read. This will restrict read access to the page for the associated roles. Once the rule is created you can apply web roles via the sub-grid on the form. Essentially, any user that has the web role assigned to the Web Page Access Control Rule will be able to see the page.
Hopefully this makes sense and solves your issue!
- Matt -
Hi Ira,
you have to create a new "web page access control rule" and select the required webpage , website , type of restriction.
on the same form below or navigation from the record - you will see "web roles" add the required roles which should see or should not be able to see that page.
docs.microsoft.com/.../webpage-access-control
hope this helps
Hello Goutam,
Thanks for your response, but I do not want to change the CRM Navigation menu but the CRM Potral Navigation menu.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156