Personalized Community is here!
Quickly customize your community to find the content you seek.
Have questions on moving to the cloud? Visit the Dynamics 365 Migration Community today! Microsoft’s extensive network of Dynamics AX and Dynamics CRM experts can help.
2021 Release Wave 1Discover the latest updates and new features to Dynamics 365 planned April 2021 through September 2021.
Release overview guides and videos Release Plan | Preview 2021 Release Wave 1 Timeline
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
Microsoft Dynamics 365 CE/CRM now has a more streamlined method to get the running users security role name without having to make a client-side API call. In the spring of 2020 there has been an update to the SDK to mark the deprecation of userSettings.securityRoles. It has been replaced with userSettings.roles.
userSettings.roles provides not only the security role guids from the global context, but the security role names as well.
Hiccup Note: While writing this blog I uncovered a bug where the name values are incorrect when an Owner Team is providing additional security roles. There is already a bug in place and is targeting a June 12th release update for North America. In mean time feel test on a development environment in preparation for the bug fix release. I will be updating this blog to remove this statement one the the fix has reached North America. Please check back and/or follow this blog post for updates.
Add the web resource as a reference on a Case form.
Register CaseForm.FromOnload on the Case form Onload event.
Publish the changes.
Identify a test user with security roles for testing.
Open a Case record.
Now we can inspect the Developer Tools (F12) in the browser (example here in Microsoft Edge based on Chromium). Note: you might need to refresh the form with a Shift+F5 to replay the form load.
We see we get the global context and inspect userSettings.roles by hovering the cursor over roles.
By expanding _collection: we see the running user security role guids …
And if we scroll to the right we see the corresponding security role name …
Business Applications communities