This seems to be a bug in Microsoft Dynamics CRM 2011. To
reproduce the bug, follow these steps:
1.
Create a relationship for an entity. I have
created a new N to 1 relationship from Account to Contact and Enable “Field
Level Security”.
2.
Create a “Field Security Profile” and give Read,
Write, Update access for this field. In my case I have two field security
profiles. One profile has no access to this field and other profile has full
access.
3.
Publish your customizations.
4.
Now, delete the relationship that you have
created.
5.
Publish your customizations again.
6.
Navigate to the Field Security Profile and open
one your Field Security Profile and click on “Field Permissions”. You can see
the below error message.
Note: I have update rollup 8 installed on my server.
Reason & Resolution:
Whenever you enable Field Level Security on any field in
Microsoft Dynamics CRM, multiple rows will be created in the “FieldSecurityBase” table in your
organization database. These records are not deleted once you delete your
relationship. This problem happens only for the field created by CRM while
creating a relationship.
To resolve this, Open your organization database from
Microsoft SQL Server Management Studio and delete the records from “FieldSecurityBase” table. You can use
the below query to delete the rows.
DELETE FROM FieldPermissionBase where
AttributeLogicalName = 'schema
name of the field'
Be careful while deleting the data form the database
directly. It is always recommended to take a backup before performing any
actions on the database directly.