Sunday, October 26, 2014

SQL query provides CRM 2011/2013 Security Role privilege options in Excel

more...

SELECT DISTINCT
FilteredRole.Name as 'Security Role Name',
EntityView.PhysicalName AS [Entity Name],
CASE Privilege.AccessRight
WHEN 1 THEN 'READ'
WHEN 2 THEN 'WRITE'
WHEN 4 THEN 'APPEND'
WHEN 16 THEN 'APPENDTO'
WHEN 32 THEN 'CREATE'
WHEN 65536 THEN 'DELETE'
WHEN 262144 THEN 'SHARE'
WHEN 524288 THEN 'ASSIGN' END AS [Access Level],
CASE PrivilegeDepthMask
WHEN 1 THEN 'User'
WHEN 2 THEN 'Business Unit'
WHEN 4 THEN 'Parent: Child Business Unit'
WHEN 8 THEN 'Organisation' END AS [Security Level]
FROM RolePrivileges
INNER JOIN FilteredRole ON RolePrivileges.RoleId = FilteredRole.roleid
INNER JOIN PrivilegeObjectTypeCodes
ON RolePrivileges.PrivilegeId = PrivilegeObjectTypeCodes.PrivilegeId
INNER JOIN Privilege ON RolePrivileges.PrivilegeId = Privilege.PrivilegeId
INNER JOIN EntityView ON EntityView.ObjectTypeCode = PrivilegeObjectTypeCodes.ObjectTypeCode
ORDER BY FilteredRole.name, [Entity Name]

Monday, August 18, 2014

Fetch-based report, Sandbox and TCP 808(rsProcessingAborted error when running custom reports)

Just a reminder, if you deploy a Dynamics CRM 2011/2013 on different servers, you need to allow the inbound TCP port 808 on the Windows Firewall Inbound Rules on the CRM application server, or change it to something meaningful to you.