Breaking news from around the world
Get the Bing + MSN extension
Now Available in Community - MBAS 2019 Presentation Videos
Catch the most popular sessions on demand and learn how Dynamics 365, Power BI, PowerApps, Microsoft Flow, and Excel are powering major transformations around the globe. | View Gallery
2019 release wave 2 Discover the latest updates to Dynamics 365Release overview guides and videos Release Plan | Early Access Availability
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Talent TechTalks | Upcoming TechTalks
A frequently asked question we get from users using Access Teams is: How do you join or link from the account record to the users on the account team in a query? The Access Team functionality is great, but it is not easily queried from the user interface – such as through Advanced Find. So, let’s talk about how you would do this from SQL.
Understanding CRM data structure is vital in this case. From a data structure, the following tables would be utilized:
Use this SQL Query to retrieve all Access Team Members for Account(s):
SELECT a.Name AS AccountName, t.Name AS TeamName, u.FirstName, u.LastName, tt.TeamTemplateName
FROM Account AS a INNER JOIN
PrincipalObjectAccess AS poa ON a.AccountId = poa.ObjectId INNER JOIN
TeamBase AS t ON poa.PrincipalId = t.TeamId INNER JOIN
TeamMembership AS tm ON t.TeamId = tm.TeamId INNER JOIN
SystemUser AS u ON tm.SystemUserId = u.SystemUserId INNER JOIN
TeamTemplate AS tt ON t.TeamTemplateId = tt.TeamTemplateId
WHERE (a.Name = ‘Test Account’)
Note: To retrieve all accounts, remove the Where Clause
Account Access Team
Hope this comes in handy! If you need additional tips and tricks, please feel free to check our multitude of Dynamics CRM blogs.
The post How to Retrieve all the Access Team Members for all Accounts in Dynamics CRM appeared first on .
Business Applications communities