使用CSOM创建项目时设置Project Server 2013必需的自定义字段 [英] Setting Project Server 2013 mandatory Custom Fields while creating a Project Using CSOM

查看:68
本文介绍了使用CSOM创建项目时设置Project Server 2013必需的自定义字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello

我正在尝试创建一个项目,同时设置一个强制的customField的值。

I'm trying to create a project and at the same time set the value of a mandatory customField.

这样做的适当方式如何?这是创建项目的基本代码:

How is the appropriate way of doing it? This is the basic code to create the project:

context = GetContext(pwaInstanceUrl);
          
// Create a project
csom.PublishedProject project = context.Projects.Add(new csom.ProjectCreationInformation()
{
  Name = projectName,
  Start = DateTime.Today,
  Description = "Creating a project using CSOM"
});

然后我尝试:

project.SetCustomFieldValue("Custom_5548a29ffe39e61180c600505687d912", "123"); 

但这不起作用。

有人可以帮帮我吗?提前致谢。

Somebody can help me? Thanks in advance.

最好的问候

推荐答案

目前无法做到这一点。我们已将此发布到Microsoft,并且回复是解决方法,使自定义字段不需要创建项目并再次需要自定义字段,直到他们修复它。我个人认为解决方法
是一个坏主意,但你没有其他选择。
This is currently not possible. We posted this to Microsoft already and the reply was the workaround to make the custom field non required create the project and make the custom field required again until they have fixed it. Personally I think the workaround is a bad idea, but you do not have another option.


这篇关于使用CSOM创建项目时设置Project Server 2013必需的自定义字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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