web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

JavaScript to check if user is on a team 2016

(0) ShareShare
ReportReport
Posted on by 410

Hi,

Basically I have a custom entity (e.g. a sector) that I want to limit access only to the owning team. I am able to get the ID and name of the team via JS with the getAttribute  & getValue functions on the "ownerid".

Where I am stuck is getting a list of the teams a user is on or getting a list of users ID's/names from a team. Either would work.

Are there any functions I can use to get these lists?

------

What I have looked at/tried:

Microsoft says their "getUserRoles" function should list all roles and teams, but it definitely does not list all of the teams. (ID's don't match).

I've seen some support for this questions for 2011/13 but nothing for more recent editions. I also had some issues where some of the functions used in guides did not exist so it made me question if functionality changed a bit (think it was the requestheader function did not work). See: https://community.dynamics.com/crm/b/dynamicscrmpros/archive/2013/09/09/checking-if-a-user-is-a-member-of-a-team-using-javascript

https://social.microsoft.com/Forums/en-US/6f9ee6fb-2ce9-4e2e-8186-90be2bba9d36/get-all-the-teams-a-user-is-a-member-of?forum=crm

Does anyone know if these should still work for 2016? Any changes that could be made?

*This post is locked for comments

I have the same question (0)
  • HodgesW Profile Picture
    410 on at

    I didn't see a way?

    I need all users to be able to lookup/append to this entity and all of its records, but only users on a specific team can view an individual record's main page.

  • HodgesW Profile Picture
    410 on at

    Thought I fixed but did not work. Can only append to the record that the team owns

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans