CSOM Bugs [英] CSOM Bugs

查看:79
本文介绍了CSOM Bugs的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

像许多人一样,我一直在为CSOM缺乏文档而苦苦挣扎。尽管沉默,我已经想出了一些事情,以及CSOM的一些错误。我把它们称为bug,因为MS没有提供任何文档来支持它应该以这种方式运行

Like many of you I have been struggling with the lack of documentation for CSOM. Despite the silence I have figured a few things out, as well as a few bugs with CSOM. I call them bugs because MS has given no documentation to support that it should behave this way.

1)C#更新自定义字段。如果您设置两个LOOKUP 自定义字段,如下所示:

1) C# Updating custom fields. if you set two LOOKUP custom fields like this:

draftProject.setCustomFieldValue(InternalName1, new object [ ] {" value"} );

draftProject.setCustomFieldValue( InternalName2, new object [] {" value2"} );

然后发布草稿项目,只保存InternalName2值。换句话说,您最后设置的查找字段将保存,其他查询字段将不会被触及。

Then publish the draft project, only the InternalName2 value saves. In other words, whichever lookup field you set last will save, the others will not be touched.

2)C#更新所有者

除了明显的状态管理器问题是无法在项目创建时设置所有者,似乎您无法通过CSOM设置项目的所有者。

Besides the obvious status manager issue of not being able to set the owner on project creation, it seems you cannot set the Owner of a project through CSOM.

draftProject.Owner = GetSPUser(ownerGUID);

所有者是"用户"宾语。我的函数返回"用户"它被传递的GUID的对象(是的,该函数可以工作,测试和调试多次)。但是,项目永远不会得到新所有者的更新。

那么,如果这些不是错误,那么文档在哪里?

So, if these aren't bugs, where is the documentation?

120811049008

120811049008

推荐答案

嗨Paul,

您描述的第一个问题是编程中的错误。您尝试设置的是多值自定义字段。因此,您有对象数组。目前,您可以替换"值"。使用"value2",因此CSOM按预期工作。它应该工作,如果你做
以下:

the first issue you describe is a bug in your programming. What you try to set is a multiple value custom field. Therefore you have the object array. Currently you replace the "value" with "value2", so CSOM is working as intended. It should work if you do the following:

draftProject.setCustomFieldValue(InternalName1,  new
object [] {" value"," value2"}
);

我希望这可以帮助你:)

I hope this helps you on that :)

问候


这篇关于CSOM Bugs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆