从PSI读取任务上的自定义字段 [英] Reading Custom Fields on Tasks from PSI

查看:55
本文介绍了从PSI读取任务上的自定义字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们希望将所有列(包括来自任务的自定义字段(对于给定的资源指导))读取到单个数据集中。


PSI SvcResource提供方法:

 ReadResourceAssignments(filter); 

此方法将返回基于任务的所有主要字段在过滤器上。 是b b $ b 可以配置一个过滤器,它将返回任务列和自定义字段,因为它在此处以黄色显示(http://msdn.microsoft.com/en-us/Library/websvcresource.resource.readresourceassignments(v=office .12 ))


有一个DataSet附加到一个名为ResourceAssignmentCustomFields的ResourceAssignmentDataSet,但没有配置过滤器,它不会返回任何结果。我认为这个DataSet可能是列,而不是与上面的结果相关联的实际行值


任何人都有解决方案 源代码示例?


如果你包括一个简洁的方法来连接ResourceAssignmentDataSet和ResourceAssignmentCustomFields数据集,以便只有一个DataSet被送入GridView,那么




Jonathan M Beck:)

解决方案

PSI有很多方法只能读取你需要的一半。在您的情况下,您需要使用方法和过滤器查询所需的所有分配,然后使用SvcProject中的方法获取具有分配的所有项目:ReadProject - 如果您
想知道有关项目或ReadProjectEntities的任何内容只有项目信息的子集。


http://msdn.microsoft.com/en-us/Library/websvcproject.project_methods(v = office.12)


您可以合并所有数据集并过滤结果庞大的数据集,或者在获得结果时逐个过滤它们 - 这取决于您。


我记得甚至在Project Pro中你只能看到带有资源分配的外部项目的名称,但你无法从项目中看到有关任务的所有细节


We would like to read all the columns, including Custom Fields from Tasks (for a given Resource Guid) into a single DataSet.

The PSI SvcResource provides a method:

ReadResourceAssignments(filter);

This method will return all the primary fields of a Task based upon a Filter.  Is it not possible to configure one Filter that will return Task Columns and Custom Fields as it states here in yellow (http://msdn.microsoft.com/en-us/Library/websvcresource.resource.readresourceassignments(v=office.12))

There is a DataSet attached to a ResourceAssignmentDataSet called ResourceAssignmentCustomFields but without configuring the Filter it does not return any results.  I think this DataSet may be the Columns and not the actual row values that can be associated with the results from above.

Anyone have a solution with source code example?

Extra points if you include a neat way to concatenate the ResourceAssignmentDataSet with the ResourceAssignmentCustomFields DataSet so that only one DataSet is fed into a GridView.


Jonathan M Beck :)

解决方案

PSI has lot of methods which read only half of what you need. In your case you need to query all the assignments you want using the method and filter and after that get all projects with the assignments using methods from SvcProject: ReadProject - if you want to know anything about the project or ReadProjectEntities to read only subset of information about the projects.

http://msdn.microsoft.com/en-us/Library/websvcproject.project_methods(v=office.12)

You may merge all of the datasets and filter the result huge dataset or filter them one-by-one at the moment you get it - that is up to you.

As I remember even in Project Pro you can only see names of the external projects with assignments for a resources, but you can't see all details about tasks from the projects


这篇关于从PSI读取任务上的自定义字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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