Sub topic 10
Account Teams and Team Roles
This chapter assumes you already know org-wide defaults (OWD), record ownership, and the role hierarchy from earlier chapters. It also assumes you can read basic SOQL. Here you will learn how account teams give specific people access to one account, and how to check what a team grants.
What an account team is
An account team is a group of users who work together on one account. Each member has a team role, such as Executive Sponsor or Sales Engineer, and an access level to the account.
Account teams solve a gap that the other mechanisms leave open. The role hierarchy opens access upward, and sharing rules open access for whole groups of records. Neither fits this case: "these three people from different parts of the company need to work on Acme, and nobody else does." An account team handles that case record by record, and the account owner or another authorized user manages it without an administrator.
There are two kinds of team to keep apart:
- A personal default team is a list of users a person builds in their own settings. It is a template.
- An account team is the actual set of members on a specific account.
When a user adds their default team to an account, the members are copied onto that account's team. Later changes to the default team do not alter accounts that already received the copy.
Prerequisites in Setup
Account teams are off by default. An administrator turns on Account Teams in Setup, under Account Settings. The admin also defines the list of team roles, which are picklist values. Team roles are labels. They describe a person's function and do not control access by themselves.
Because the feature is off until enabled, a missing Add button under Account Team on the account page is usually a settings problem, not a permissions problem.
Access levels for team members
Each member gets one access level to the account:
| Access level | What the member can do |
|---|---|
| Read Only | View the account |
| Read/Write | View and edit the account |
Some orgs also expose related-record access for contacts, opportunities, and cases through the team member's settings, depending on the account's OWD and the org's configuration. Check what your org shows before promising a user this behavior.
The most important rule is the one in the concept graph: account teams can only open access, never close it. If the OWD for Account is Public Read/Write, adding a team member with Read Only does not restrict that person. The OWD still gives them edit rights. Team access is most useful when the account OWD is Private or Public Read Only.
| Account OWD | Effect of adding a Read/Write team member |
|---|---|
| Private | Member gains access they did not have |
| Public Read Only | Member gains edit access |
| Public Read/Write | No change, they already have it |
How access flows
Two records are involved. The AccountTeamMember record stores who is on the team, their role, and their access level. A matching row in AccountShare is what actually grants access. That row carries the row cause Team. Share objects and row causes get their own chapter, but you need the idea here to troubleshoot.
Who can manage the team
By default, these people can add and remove members:
- The account owner.
- Users above the owner in the role hierarchy.
- Administrators.
- Users who have Full Access to the account through some other share.
A team member with Read/Write access cannot necessarily manage the team. Editing the account and managing its team are separate abilities. If a Read/Write member reports that they can't add colleagues, this is the likely reason.
Querying team members
You can inspect a team with SOQL. This query returns each member of one account's team, their role, and their access level:
SELECT Id, AccountId, UserId, TeamMemberRole, AccountAccessLevel
FROM AccountTeamMember
WHERE AccountId = '<account record Id>'Replace the placeholder with a real 15 or 18 character account Id. TeamMemberRole holds the role label, and AccountAccessLevel holds the access level, such as Read or Edit.
To see the share rows that these members produced, query AccountShare. Filter on the row cause to separate team rows from other kinds:
SELECT Id, AccountId, UserOrGroupId, AccountAccessLevel, RowCause
FROM AccountShare
WHERE AccountId = '<account record Id>'
AND RowCause = 'Team'Comparing the two result sets confirms that every team member has a matching share. If a member exists in AccountTeamMember but the account's OWD already grants equal or better access, the share row may be absent. Salesforce does not store redundant implicit access in the same way, so a missing row is not always a defect.
Account teams versus other mechanisms
| Need | Better fit |
|---|---|
| Named people on one account | Account team |
| Everyone in a department sees certain accounts | Sharing rule |
| One-time share to a colleague | Manual sharing |
| People who must always see their reports' accounts | Role hierarchy |
Account teams and manual sharing look similar, since both grant access to one record. The difference is structure. A team member carries a role, shows in a dedicated related list, and can be copied from a default team. Manual shares have no role and are removed when the owner changes. Team members persist through an ownership change in most cases, though you should verify this in a sandbox before depending on it, because behavior differs by configuration.
Common errors
- Expecting a team to restrict access. It cannot. Lower the OWD instead.
- Confusing role and access. Giving someone the role "Executive Sponsor" does not give them edit access. The access level does.
- Assuming default team edits propagate. They don't. Existing accounts keep their copy.
- Adding hundreds of members to one account. Large teams slow recalculation and complicate troubleshooting. Prefer a public group with a sharing rule when many people need the same access.
- Forgetting object permissions. A team grants record access only. A user whose profile or permission set lacks Read on Account still can't open it.
Practical walkthrough
Suppose Account OWD is Private. Maria owns the Acme account. Raj in Support needs to view it and Lena in Pre-Sales needs to edit it.
- Maria opens Acme and goes to the Account Team related list.
- She adds Raj with the role Support Lead and access Read Only.
- She adds Lena with the role Sales Engineer and access Read/Write.
- She runs the
AccountTeamMemberquery to confirm two rows. - She runs the
AccountSharequery withRowCause = 'Team'to confirm two share rows.
Raj can now open Acme but not edit it. Lena can edit it. Neither can see Maria's other accounts.
Exercise
The Account OWD is Public Read/Write. An administrator adds a user to an account team with Read Only access, expecting to stop that user from editing the account. Will it work, and what should be changed instead?
Show answer
It will not work. Team membership only opens access, and the Public Read/Write OWD already lets the user edit. To limit editing, change the Account OWD to Public Read Only or Private, then grant edit access to specific people through team members, sharing rules, or manual shares.
Exercise
A user is a Read/Write member of an account team but cannot add a new member. What is the likely explanation, and which query would you use to confirm the user's team record?
Show answer
Editing the account and managing its team are separate abilities, so Read/Write access does not allow team management. Only the owner, users above the owner in the role hierarchy, administrators, and users with Full Access can manage it. To confirm the record, query AccountTeamMember filtered on the AccountId and look at the member's UserId and AccountAccessLevel.