使用 SharePoint 复制 Web 服务时如何设置托管元数据字段?
我正在使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
托管元数据字段的格式与查找字段类似(即“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.