web服务 – 使用CopyIntoItems上载文档时无法更新查询字段

web服务 – 使用CopyIntoItems上载文档时无法更新查询字段,第1张

概述我正在尝试使用Copy.asmx webservice,CopyIntoItems方法从本地计算机上载文档.我可以成功上传文档和DateTime属性,但我无法更新文档库的查找属性.我正在使用带有sp2的MOSS 2007 我使用的代码如下所示: string[] destinationUrls = { Uri.EscapeUriString(destinationUrl) };CopyShar 我正在尝试使用copy.asmx webservice,copyIntoItems方法从本地计算机上载文档.我可以成功上传文档和DateTime属性,但我无法更新文档库的查找属性.我正在使用带有sp2的MOSS 2007

我使用的代码如下所示:

string[] destinationUrls = { Uri.EscapeUriString(destinationUrl) };copySharepointService.FIEldinformation dateinformation = new copySharepointService.FIEldinformation();dateinformation.displayname = "Date";dateinformation.Type = copySharepointService.FIEldType.DateTime;dateinformation.Value = DateTime.Today.ToString();copySharepointService.FIEldinformation fundinformation = new copySharepointService.FIEldinformation();fundinformation.displayname = "Fund";fundinformation.Type = copySharepointService.FIEldType.Lookup;fundinformation.ID = new GuID(fundGuIDItem); // This is the GUID of the fIEld being updated in the document libraryfundinformation.Value = "1";copySharepointService.FIEldinformation[] info = { dateinformation,fundinformation };            copySharepointService.copyResult[] result;    copySharepointService.copySoapClIEnt copyService2007 = new copySoapClIEnt("copySoap");copyService2007.ClIEntCredentials.windows.ClIEntCredential = CredentialCache.DefaultNetworkCredentials;copyService2007.copyIntoItems(destinationUrl,destinationUrls,info,fileData,out result);

文档已成功上载,但查找字段未更新

有人可以帮忙吗?

解决方法 我刚发现这个帖子:

“不幸的是,copyIntoItems不会将信息放入”file“,”Computed“或”Lookup“类型的字段中.Web服务使用SPcopy类的copyIntoItem,它调用一个名为FIEldShouldBecopIEdTo的私有方法.此方法包含逻辑prventing查找字段被复制.“

http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/2fdc9933-ddb8-446f-80ad-6c8e17dfdb6f

我有时讨厌SharePoint.

总结

以上是内存溢出为你收集整理的web服务 – 使用CopyIntoItems上载文档时无法更新查询字段全部内容,希望文章能够帮你解决web服务 – 使用CopyIntoItems上载文档时无法更新查询字段所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1076749.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-26
下一篇 2022-05-26

发表评论

登录后才能评论

评论列表(0条)

保存