【问题标题】:How do you set a Managed Metadata field when using SharePoint Copy Web Service?使用 SharePoint 复制 Web 服务时如何设置托管元数据字段?
【发布时间】:2013-04-22 16:35:53
【问题描述】:

我正在使用 SharePoint Copy Web 服务将文件上传到文档库。该库正在使用包含托管元数据字段的内容类型。我不知道如何使用 FieldInformation 类来更新此字段。使用此方法设置任何其他字段时,我没有任何问题。可以找到我如何使用 FileInformation 上传文件的示例here

我尝试通过其显示名称以及具有相同名称加 0 的“隐藏”注释字段来设置该字段。

SharePointCopyWebService.FieldInformation fieldInfo = new SharePointCopyWebService.FieldInformation();
fieldInfo.DisplayName = "Internal Audit Topics_0";
fieldInfo.Type = SharePointCopyWebService.FieldType.Note;
fieldInfo.Value = "Known Term";
fieldInfoArray.Add(fieldInfo);

附加信息:

  • 这是在 Win Forms 应用程序中运行的
  • 我不允许使用 SharePoint 服务器/客户端对象模型

关于如何使用 FieldInformation 类更新托管元数据字段的任何想法?

【问题讨论】:

  • 你能解决这个问题吗?我遇到了类似的问题,我相信它与元数据字段名称中的空格有关。如果仅在名称中包含零个空格,我可以更新一列。 Here is my similar question

标签: c# web-services sharepoint metadata


【解决方案1】:

managed metadata field has a format 类似于查找字段(即“id;#value”),但它需要术语标签的 guid,例如"id;#TermLabel|xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx"

这会起作用,但是强制外部应用程序知道 guid 的正确值几乎会破坏这个从外部系统更新的功能。

【讨论】:

    猜你喜欢
    • 2020-02-20
    • 2020-08-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-03-01
    • 2011-06-19
    • 2014-05-05
    • 2016-01-11
    相关资源
    最近更新 更多