Hi all
I need to find which security role has merge privilege. Is there any query or advanced find view which makes me help to retrieve this kind of information.
Thank you
*This post is locked for comments
Hi Abdul Wahab,
Try the following query.
SELECT DISTINCT r.Name ,COALESCE(e.OriginalLocalizedName, e.Name) AS [EntityName] ,CASE p.AccessRight WHEN 32 THEN 'Create' /* or hex value 0x20*/ WHEN 1 THEN 'Read' WHEN 2 THEN 'Write' WHEN 65536 THEN 'Delete' /* or hex value 0x10000*/ WHEN 4 THEN 'Append' WHEN 16 THEN 'AppendTo' WHEN 524288 THEN 'Assign' /* or hex value 0x80000*/ WHEN 262144 THEN 'Share' /* or hex value 0x40000*/ ELSE 'None' END AS [Privilege] ,CASE (rp.PrivilegeDepthMask % 0x0F) WHEN 1 THEN 'User (Basic)' WHEN 2 THEN 'Business Unit (Local)' WHEN 4 THEN 'Parental (Deep)' WHEN 8 THEN 'Organization (Global)' ELSE 'Unknown' END AS [PrivilegeLevel] ,(rp.PrivilegeDepthMask % 0x0F) as [PrivilegeDepthMask] ,CASE WHEN e.IsCustomEntity = 1 THEN 'Yes' ELSE 'No' END AS [IsCustomEntity] FROM Role AS r INNER JOIN RolePrivileges AS rp ON r.RoleId = rp.RoleId INNER JOIN Privilege AS p ON rp.PrivilegeId = p.PrivilegeId INNER JOIN PrivilegeObjectTypeCodes AS potc ON potc.PrivilegeId = p.PrivilegeId INNER JOIN MetadataSchema.Entity AS e ON e.ObjectTypeCode = potc.ObjectTypeCode ORDER BY r.Name, [EntityName]
Please go through the following link for Dynamics CRM 2011 Security Role SQL query.
stackoverflow.com/.../dynamics-crm-2011-security-role-sql-query
SELECT r.Name FROM Privilege p
JOIN RolePrivileges rp on p.PrivilegeId = rp.PrivilegeId
JOIN Role r on r.RoleId = rp.RoleId
where p.Name = 'prvMerge'
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
HR-09070029-0 2
UllrSki 2
ED-30091530-0 1