【发布时间】:2014-04-30 15:58:26
【问题描述】:
是否可以查看 Dynamic CRM 2011 解决方案中的所有实体映射?我知道我可以从“自定义系统”部分按实体查看它们,但想知道它们是否存储在数据库的特定部分中。我浏览了几份 MS 文档,但没有任何东西能指出我们需要什么。我需要这个,所以我可以(希望)创建一个关系图。
【问题讨论】:
是否可以查看 Dynamic CRM 2011 解决方案中的所有实体映射?我知道我可以从“自定义系统”部分按实体查看它们,但想知道它们是否存储在数据库的特定部分中。我浏览了几份 MS 文档,但没有任何东西能指出我们需要什么。我需要这个,所以我可以(希望)创建一个关系图。
【问题讨论】:
查看关系表:
select relationship.Name, SecondaryEntity = referencing.Name, LookupField = referencingAttribute.Name, PrimaryEntity = referenced.name, PrimaryEntityKey = referencedAttribute.Name, relationship.*
from [Database]..RelationshipView relationship
join [Database]..EntityView referencing on relationship.ReferencingEntityId = referencing.EntityId
join [Database]..EntityView referenced on relationship.ReferencedEntityId = referenced.EntityId
join [Database]..AttributeView referencingAttribute on relationship.ReferencingAttributeId = referencingAttribute.AttributeId
join [Database]..AttributeView referencedAttribute on relationship.ReferencedAttributeId = referencedAttribute.AttributeId
--where SolutionId in () --Filter by the solution(s) you are interested in
【讨论】:
这里是MS发布的实体关系图的链接。 http://www.microsoft.com/en-us/download/details.aspx?id=2640
【讨论】: