Hi,
I believe this was a known issue in one of the updates. Which one do you installed?
You should install latest or execute:
/*Description:
This script adds the missing FieldPermission attributes for the System Admin users and updates the user's principal attribute access
*/
-- The SystemAdminProfile guid is fixed guid across all CRM instances
DECLARE @SysAdminProfileId UNIQUEIDENTIFIER = '572329C1-A042-4E22-BE47-367C6374EA45'
/*
* FIND MISSING ADMIN FIELD SECURITY ATTRIBUTES
*/
DECLARE @MissingAdminSecuredAttributes TABLE(
LogicalName NVARCHAR(50),
ObjectTypeCode INT,
SolutionId UNIQUEIDENTIFIER,
IsManaged BIT)
-- Find the missing secured attributes for the admin profile
INSERT INTO @MissingAdminSecuredAttributes
SELECT
av.LogicalName,
ev.ObjectTypeCode,
ev.SolutionId,
av.IsManaged
FROM AttributeView av
JOIN EntityView ev
ON ev.EntityId = av.EntityId
WHERE av.IsSecured = 1
AND av.LogicalName NOT IN (
SELECT
fp.AttributeLogicalName
FROM FieldPermission fp
WHERE fp.FieldSecurityProfileId = @SysAdminProfileId
AND fp.EntityName = ev.ObjectTypeCode)
DECLARE @MissingAdminSecuredAttributesCount INT = @@ROWCOUNT
IF (@MissingAdminSecuredAttributesCount = 0)
RETURN
/*
* INSERT MISSING ADMIN FIELD SECURITY ATTRIBUTES INTO FIELDPERMISSIONSTABLE
*/
-- Insert missing admin secured attributes into FieldPermissionBase - Active Row
INSERT INTO FieldPermissionBase(
AttributeLogicalName,
EntityName,
SolutionId,
IsManaged,
CanRead,
CanUpdate,
CanCreate,
FieldSecurityProfileId,
ComponentState,
OverwriteTime,
FieldPermissionId)
SELECT
LogicalName,
ObjectTypeCode,
SolutionId,
IsManaged,
4,
4,
4,
@SysAdminProfileId,
0,
0,
NEWID()
FROM @MissingAdminSecuredAttributes
-- Insert missing admin secured attributes into FieldPermissionBase - Sentinel Row
INSERT INTO FieldPermissionBase(
AttributeLogicalName,
EntityName,
SolutionId,
IsManaged,
CanRead,
CanUpdate,
CanCreate,
FieldSecurityProfileId,
ComponentState,
OverwriteTime,
FieldPermissionId)
SELECT
fp.AttributeLogicalName,
fp.EntityName,
fp.SolutionId,
fp.IsManaged,
4,
4,
4,
@SysAdminProfileId,
2,
GETUTCDATE(),
fp.FieldPermissionId
FROM FieldPermissionBase fp
WHERE fp.AttributeLogicalName IN (
SELECT
ma.LogicalName
FROM @MissingAdminSecuredAttributes ma
WHERE ma.ObjectTypeCode = fp.EntityName)
-- Verify attributes are no longer missing
SELECT
av.LogicalName AS StillMissingLogicalName
FROM AttributeView av
JOIN EntityView ev
ON ev.EntityId = av.EntityId
WHERE av.IsSecured = 1
AND av.LogicalName NOT IN (
SELECT
fp.AttributeLogicalName
FROM FieldPermission fp
WHERE fp.FieldSecurityProfileId = @SysAdminProfileId
AND fp.EntityName = ev.ObjectTypeCode)
DECLARE @UpdatedMissingAdminSecuredAttributesCount INT = @@ROWCOUNT
/*
* UPDATE SYSTEM ADMIN USERS ATTRIBUTE ACCESS
*/
DECLARE @SystemAdminProfileUserIds EntityIdCollection;
DECLARE @SystemAdminProfileTeamIds EntityIdCollection;
-- Find users associated to the System Admin profile
INSERT INTO @SystemAdminProfileUserIds
SELECT
sup.SystemUserId
FROM SystemUserProfiles sup
WHERE sup.FieldSecurityProfileId = @SysAdminProfileId
-- Find teams associated to the System Admin profile
INSERT INTO @SystemAdminProfileTeamIds
SELECT
tp.TeamId
FROM TeamProfiles tp
WHERE tp.FieldSecurityProfileId = @SysAdminProfileId
-- Bulk update the access for the teams and users associated with the Admin profile
EXEC p_PrincipalAttributeAccessMapReinitBulk
@SystemAdminProfileUserIds,
@SystemAdminProfileTeamIds,
1;
Please do a backup before executing any SQL script. After executing this do an IISReset.
EDIT: this script can be found inside Update 9.0.9.4.
Regards,