使用 SharePoint 复制 Web 服务时如何设置托管元数据字段?

发布于 2024-11-19 02:17:14 字数 796 浏览 2 评论 0原文

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

我尝试通过其显示名称以及具有相同名称的“隐藏”注释字段加上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 类更新托管元数据字段有什么想法吗?

I am using the SharePoint Copy web service to upload a file to a document library. The library is using a content type that contains a managed metadata field. I can not figure out how to update this field by using the FieldInformation class. I have not had any issues setting any of the other fields using this method. An example of how I am uploading the file with the FileInformation can be found here

I have tried to set the field via its Display Name as well as the "hidden" note field with the same name plus 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);

Additional Info:

  • This is running inside a Win Forms application
  • I am not allowed to use the SharePoint Server/Client Object Models

Any ideas on how to update the managed metadata field with the FieldInformation class?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

没︽人懂的悲伤 2024-11-26 02:17:14

托管元数据字段的格式与查找字段类似(即“id;#value”),除非它需要术语标签的guid,例如“id;#TermLabel|xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx”

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

The managed metadata field has a format similar to the lookup field (i.e. "id;#value") except it requires the guid of the term label e.g. "id;#TermLabel|xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

This will work, but forcing external applications to know the correct value of the guids pretty much ruins this feature for updating from external systems.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文