View Records shared with an “Access Team”

I had a really simple requirement the other day but it took me time to work out the solution! So I thought I would describe my challenge and the solution …. in an attempt to help others. In this post I will explain how to create a view of records shared with from an access team.

Before I show creating a view to see all opportunities shared with me from access teams …. I thought I should first explain what an Access Team is and how we create one!

What is an Access Team?

Access Teams are dynamic or temporary teams that are used to grant access to a specific record. A common use might be on opportunities … a sales person may own an opportunity but needs others to collaborate on the potential sale with them. In this scenario they could add users into an access team on the opportunity form. This would grant the users access to just the specific opportunity shared.

Creating an Access Team

We first create an “Access Team Template”. Then add a sub grid onto our form. (Users can then be added to the team from that sub grid.)

Create Access Team Template

In the advanced settings area of Dynamics 365 under security you will find an ” Access Team Templates” option. (As shown below.)

Below you can see that I have created a team template which grants permissions on the opportunity entity. In my example user can see and update my opportunities. They can also associate (aka append) records to this opportunity and associate this opportunity with other records. But I will not allow anyone to delete, share or reassign my opportunities.

Add subgrid onto the Opportunity Form

Below you can see the settings I used when adding a sub grid to my form.

FYI: I found I needed to use the classic form editor to do this! Adding the grid using the newer form editor did add the sub grid to my form but when I opened an opportunity it showed all users in the grid. So I removed the grid and re-created using the classic form editor. That worked perfectly.

Notice that the records option says “All Record Types”. And that the entity is “Users”. I then select a “special” view called “Associated Record Team Members”. And finally I selected the Access Team Template I’d already created for opportunities.

Now I have a sub grid on my opportunity we can add users into the grid. Everyone added into this access team would then be able to collaborate on this opportunity.

My View

Having setup my access team I was asked “how would a user find all the opportunities shared with them?”. This is a very simple and probably essential request. But as I mentioned in my opening I didn’t immediately know how to achieve this.

Obviously creating a view of all the opportunities owned by a user is a simple and common request. We’d just filter the view using something like “owner equals correct user”.

I needed to create something similar but instead of looking at the owner field I needed to filter opportunities when the current user is a member of the access team. The filtering I used is shown below.

Notice that I have first connected to a related table. This is “Team (Regarding Object Id)”. Doing this will return me all opportunities with an access team associated with them.

Then from the Team table I connect with another related table, this time I selected the many to many relationship between Team and users. Finally I could add that my “user” field “equals current user “. This filters on opportunities with me as a member of the access team.

Below you can see I have shown the same query using the older style “advanced find” interface. Just in case you happen to prefer seeing the queries represented like this!

As you can see this was a simple change but as I didn’t instantly know the answer I hope these details might help anyone facing the same challenge. Enjoy.

2 thoughts on “View Records shared with an “Access Team”

  1. Hi Neil!
    Great post and really relevant- you actually helped me pass the MSFT Certification exam.

    Is there any way to use an OR statement to show opportunities the user owns or is on the access team for? Idea would be to have one view with all projects/transactions they are a part of.

    Thanks again!


    • I wish I could say an OR would work! But currently as soon as we add a filter on a related entity we only see records that have rows in that table. Maybe one day Microsoft will support filtering that has an OR across entities! But for now we’d need two views. “Sorry!”


Leave a Reply to Andrew Yoder Cancel reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s