共用方式為


CustomFields.ReadCustomFields 方法

取得企業自訂欄位定義。

命名空間:  WebSvcCustomFields
組件:  ProjectServerServices (在 ProjectServerServices.dll 中)

語法

'宣告
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/office/project/server/webservices/CustomFields/ReadCustomFields", RequestNamespace := "https://schemas.microsoft.com/office/project/server/webservices/CustomFields/",  _
    ResponseNamespace := "https://schemas.microsoft.com/office/project/server/webservices/CustomFields/",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Function ReadCustomFields ( _
    xmlFilter As String, _
    autoCheckOut As Boolean _
) As CustomFieldDataSet
'用途
Dim instance As CustomFields
Dim xmlFilter As String
Dim autoCheckOut As Boolean
Dim returnValue As CustomFieldDataSet

returnValue = instance.ReadCustomFields(xmlFilter, _
    autoCheckOut)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/office/project/server/webservices/CustomFields/ReadCustomFields", RequestNamespace = "https://schemas.microsoft.com/office/project/server/webservices/CustomFields/", 
    ResponseNamespace = "https://schemas.microsoft.com/office/project/server/webservices/CustomFields/", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public CustomFieldDataSet ReadCustomFields(
    string xmlFilter,
    bool autoCheckOut
)

參數

  • autoCheckOut
    類型:System.Boolean

    如果true,取出的自訂欄位進行修改。

傳回值

類型:WebSvcCustomFields.CustomFieldDataSet
CustomFieldDataSet包含xmlFilter參數所指定的資訊。

備註

CustomFieldDataSet主要DataTable是CustomFieldsDataTable。沒有次要通用值。xmlFilter參數搭配Criteria運算子來篩選CustomFieldsDataTable內的資料列。您可以使用Fields.Add方法來篩選資料行中主要CustomFieldsDataTable。

注意事項注意事項

針對Project Server 2010,傳回的CustomFieldDataSet可包含Relative Importance自訂欄位以及Project Impact自訂欄位。Project Web App不會顯示這些自訂欄位的企業自訂欄位與查閱表格] 頁面上,因為它們是內建的產品組合分析並無法修改或刪除。

秘訣秘訣

ReadCustomFields方法會略過執行 Project Server 之電腦的地區設定。ReadCustomFields2方法會傳回公式的計算自訂欄位] 和 [圖形標記的地區設定相關的值。

For a code example that uses the ReadCustomFields2 method, see ReadCustomFields2. For more information, see How to: Use a Filter Parameter with PSI Methods

Project Server 權限

權限

描述

LogOnToProjectServerFromProjectProfessional

可讓使用者從 Project Professional 連線至 Project Server 資料庫。通用權限。

ManageEnterpriseCustomFields

可讓使用者修改企業自訂欄位與查閱表格值的定義。通用權限。

ManageUsersAndGroups

可讓使用者管理 Project Server 使用者和群組。通用權限。

NewProject

可讓使用者建立一個專案。通用權限。

ViewResourceCenter

可讓使用者檢視資源分派資料。通用權限。

請參閱

參照

CustomFields 類別

CustomFields 成員

WebSvcCustomFields 命名空間

ReadCustomFields2(String, Boolean)

其他資源

How to: Use a Filter Parameter with PSI Methods