Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

Xrm.Utility.getGlobalContext().userSettings.roles is unavailable in Web Client UI

Posted on by 384

Hi Guys,

I tried replacing this method from Xrm.Utility.getGlobalContext().userSettings.securityRoles to Xrm.Utility.getGlobalContext().userSettings.roles, however I found this new method Xrm.Utility.getGlobalContext().userSettings.roles is just available in the Unified Interface, it would occur exception in the web client. 

I'm not sure if you're in the same situation.

Thanks,

Dejun

  • Stone Huang Profile Picture
    Stone Huang 384 on at
    RE: Xrm.Utility.getGlobalContext().userSettings.roles is unavailable in Web Client UI

    Thank you, I think this is a good workaround.

  • Stone Huang Profile Picture
    Stone Huang 384 on at
    RE: Xrm.Utility.getGlobalContext().userSettings.roles is unavailable in Web Client UI

    Hmm... Do you know where can raise a support case?

  • Pramod M Profile Picture
    Pramod M 1,445 on at
    RE: Xrm.Utility.getGlobalContext().userSettings.roles is unavailable in Web Client UI

    Meanwhile you can use Xrm.Internal.isUci() to check if it is an UCI client or not

    if(Xrm.Internal.isUci()){Xrm.Utility.getGlobalContext().userSettings.roles}

    else{Xrm.Utility.getGlobalContext().userSettings.securityRoles}

  • Suggested answer
    RE: Xrm.Utility.getGlobalContext().userSettings.roles is unavailable in Web Client UI

    Hi Dejun,

    According to docs.microsoft.com/.../important-changes-coming   Xrm.Utility.getGlobalContext().userSettings.roles should work on web client.

    I have tested on a vanilla and can reproduce it :

    pastedimage1597228172560v1.png

    Can you please raise a support case with us ?

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!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans