Posts

Showing posts from July, 2017

Finding Parental and Cascading Relationships In CRM using SQL

This script will find custom Parental or Cascading Relationship between entities in CRM.  This script was used to determine if someone had changed a relationship on a target system and if that change was causing an import to fail. SELECT REL.[Name] ,[CascadeLinkMask] ,Referencing_Entity.LogicalName ,Referencing_Attribute.LogicalName ,Referenced_Entity.LogicalName ,Referenced_Attribute.LogicalName ,[RelationshipType] ,[CascadeDelete] ,[CascadeAssign] ,[CascadeShare] ,[CascadeUnShare] ,[CascadeMerge] ,[CascadeReparent] ,[IsCustomRelationship] FROM [DefenseReady_MSCRM].[MetadataSchema].[Relationship] REL left join DefenseReady_MSCRM.MetadataSchema.Entity Referencing_Entity on REL.ReferencingEntityId = Referencing_Entity.EntityId left join DefenseReady_MSCRM.MetadataSchema.Entity Referenced_Entity on REL.ReferencedEntityId = Referenced_Entity.EntityId left join DefenseReady_MSCRM.MetadataSchema.Attrib...