Announcements
I've successfully built a workflow using the Workflow Tools add-on which lets you check whether a current user is part of a Team, but I'm trying to save having to add 30 teams to this logic and instead have it look for the Parent Teams of the current user's team. I was hoping it would automatically do this without having to spell it out, but after testing - I was able to see I have to put the specific team on the user's record rather than it go through the heirarchy.
Let me know if you have any solutions in a low code/no code way to get at this same condition. Thanks!
Thanks, Leah Ju.
I was able to get it worked out with the help of your answer above, specifically the screenshots showing the 'teammemberships' list was very helpful as it's not shown in the listed tables. We actually had another field on the Team table that was better to use than the Parent Team, but it was the same concept you spelled out.
For those who might find this later, we wanted completed activities to update a field on the Contact, Account or Opportunity but only if the User was from a certain Team. And we had 30-40 teams which meet this criteria and adjust frequently, so we didn't want to maintain such a large list of conditions. So instead we wanted to narrow it down to a particular Team Type.
Basically, our Flow's setup looked something like this (very similar to what Leah Ju showed above):
1) Trigger 'when a row is modified' with filter rows on statecode eq 1 (Completed)
2) List the system user's team memberships with a filter rows on systemuserid eq 'Owner Value' (dynamic content)
3) Apply to each: Get the Team ID for each Team Membership the system user is part of
4) Within each: List Teams with filter rows on teamid eq 'TeamId' (dynamic content)
5) Apply to each: Condition to check for the field which rests on the Team table
6) Proceed to rest of the conditions and update records accordingly.
Note: unless you do something to filter the row count - this will perform this flow for each team membership the user is part of. So if the User has 5 teams, they would be run through 5 different times and whichever ones return a 'true' output would perform the action within the trigger. So if it's creating new records or you don't want your audit history showing multiple updates - you would want to factor that in and make some subtle changes.
Hi Partner,
I understand your needs, you want to get parent team of the current user's team.
Though your users are only part of one team, OOB relationship between user and team is N:N, so you can't get user's team's parent team through workflow directly.
You need use js or flow to get related team of current user, then use the team to get parent team.
Otherwise, you can create a new 1:N relationship between Team and User, one team lookup field can be shown in the user, which will make you get user's team's parent team easily.
Just like: Contacts are part of Account, and each account has one parent account.
Hey Leah Ju,
Sorry for the confusion, and thank you for that detailed explanation!
Our users are only part of one team, but their team might have a parent team. So the user could be on Northwest Sales Team, but that Northwest Sales Team then has a parent team of Sales Department above it.
Rather than building the workflow condition to check if current user is on any of the various sales teams, I’m trying to find a way to say “if a user is part of any team which has ‘Sales Department’ as its Parent Team; then… xyz (rest of workflow)”.
Hi Partner,
User and Team are N:N relationship, which means that one user can be associated with multiple teams.
Workflow Tools add-on can make you check if the user is member of a team or not, but it needs you input team manually.
If you want to list all teams related to the user directly, workflow can't achieve it, you need try to use js or power automate to retrieve all related teams.
1.JS:
2.Power automate:
Refer following link for more details:
Microsoft Flow: Retrieve N:N records in D365 - Microsoft Dynamics 365 Community
André Arnaud de Cal...
294,161
Super User 2025 Season 1
Martin Dráb
232,942
Most Valuable Professional
nmaenpaa
101,158
Moderator