【问题标题】:Is it possible to map External Content Type to Office Item Type without using SharePoint Designer?是否可以在不使用 SharePoint Designer 的情况下将外部内容类型映射到 Office 项目类型?
【发布时间】:2015-03-12 22:23:35
【问题描述】:
我需要将 Outlook 连接到外部列表,并且必须将其内容类型映射到 Office 项目类型,但不幸的是我在 SPD2013 中看不到它。可能是因为 BDC 模型使用了 OData,在 SPD2013 中支持有限(my question about it)。
那么,是否可以在不使用 SharePoint Designer 的情况下将外部内容类型映射到 Office 项目类型?如果是这样,我该怎么做?
提前谢谢你。
PS:SharePoint 2013 RTM。
【问题讨论】:
标签:
sharepoint-2013
external-contenttype
【解决方案1】:
万岁!
经过三天不成功的谷歌搜索并到处问这个问题 :-) 我试图自己调查它,最后,我找到了一种方法!
似乎很容易手动绘制它。为此,您必须在 BDC 模型文件(扩展名为 .bdcm 的 xml)中进行 2 处更改:
将名称为 Office 项目类型的属性添加到实体
<Entities>
<Entity Name="AbsenceCalendar" DefaultDisplayName="AbsenceCalendar" Namespace="MyNameSpace" Version="1.0.0.0" EstimatedInstanceCount="2000">
<Properties>
<Property Name="OutlookItemType" Type="System.String">Appointment</Property>
...
</Properties>
...
将必要的字段映射到办公室项目类型。例如,对于约会办公室项目类型的必填字段,它可能看起来像
<Method Name="ReadSpecificAbsenceCalendarEntity" DefaultDisplayName="Read Specific AbsenceCalendarEntity" IsStatic="false">
......
<Parameter Name="@AbsenceCalendarEntity" Direction="Return">
<TypeDescriptor Name="AbsenceCalendarEntity" DefaultDisplayName="AbsenceCalendarEntity" TypeName="Microsoft.BusinessData.Runtime.DynamicType">
<TypeDescriptors>
<TypeDescriptor Name="Title" DefaultDisplayName="Title" TypeName="System.String">
<Properties>
<Property Name="OfficeProperty" Type="System.String">Subject</Property>
</Properties>
</TypeDescriptor>
<TypeDescriptor Name="StartDate" DefaultDisplayName="StartDate" TypeName="System.DateTime">
<Properties>
<Property Name="OfficeProperty" Type="System.String">Start</Property>
</Properties>
</TypeDescriptor>
<TypeDescriptor Name="EndDate" DefaultDisplayName="EndDate" TypeName="System.DateTime">
<Properties>
<Property Name="OfficeProperty" Type="System.String">End</Property>
</Properties>
</TypeDescriptor>
.......