MS CRM 4.0 Relationship Mappings Error

Whenever relationship is deleted but relationship attribute is used in another relationship mappings. In that case if you click on mappings you will get below error message. Cause: attribute is deleted but attribute is used in attribute mappings. In MS CRM attribute relationship mappings are saved in following tables E ntityMapBase AttributeMapBase Identify the mapping record in EntityMapBase Table. Take the GUID of that record and find the related attribue records in AttributeMapTable select * from dbo . AttributeMapBase where EntityMapId = 'place your relationship record GUID' update the your deleted attribute records DeletionStateCode with 2.