使用 Project Server 接口检索企业项目类型
我目前正在构建一个应用程序,以便使用通过 Project Server Interface (PSI) 公开的 Web 服务以编程方式在 Microsoft Project Server 中创建项目。
我可以使用 QueueCreateProject 方法创建具有企业项目类型的项目,但是,我需要指定 EPT 的 GUID,我不想将其硬编码到代码中。
是否有其他 Web 服务或方法来获取通过名称找到的特定 EPT 的 GUID?
另外,自定义字段是否可以用同样的方式完成?
I am currently building an app to programatically create projects in Microsoft Project Server using the web services exposed through the Project Server Interface (PSI).
I am able to create a project with an Enterprise Project Type using the QueueCreateProject method, however, I need to specify the GUID of the EPT which I don't want to hard code into the code.
Is there another web service or way to get the GUID of a specific EPT found by its name?
Also, can the same be done for custom fields in the same way?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为您正在寻找的是 PSI 筛选器参数。查看 这篇文章是检索自定义字段的 Guid 的示例。
实际上,我认为关键是设置过滤条件:
其中
nameColumn
是cfDataSet.CustomFields.MD_PROP_NAMEColumn.ColumnName
,customFieldName
是您传递的值如果你像我一样,你想在很多领域都这样做。我使用过滤器来查询所有字段名称和 MD_PROP_UID,然后将其放入哈希表中,这样我就不必继续进行 PSI 调用。
免责声明:我使用 2007,但我假设它对于自定义字段来说基本相同(不适用于我未包含的 EPT 部分)。
I think what you're looking for is PSI Filter parameters. Check out this post for an example of retrieving the Guid of a custom field.
Really, I think the key is setting the filter criteria:
Where
nameColumn
iscfDataSet.CustomFields.MD_PROP_NAMEColumn.ColumnName
andcustomFieldName
is a value you pass in.If you are like me, you want to do this for a lot of fields. I used a filter to query all the field names and
MD_PROP_UID
's and then just put it in a hashtable so I don't have to keep making PSI calls.Disclaimer: I use 2007 but I'm assuming it is mostly the same for custom fields (not for the EPT part which I didn't include).
这是一个答案: https://stackoverflow.com/a/12267251/1594383
简而言之:这些方法可从工作流服务。
Here is an answer: https://stackoverflow.com/a/12267251/1594383
In short: the methods are available from Workflow service.