Export (0) Print
Expand All

ProjectCodeValues Method

Office 2003

Description

Gets a list of the active enterprise custom field structures, including enterprise outline code values and the enterprise custom field values, for a project in Microsoft Office Project Server 2003.

Syntax

<Request>
   <ProjectCodeValues>
      <ProjectID></ProjectID>
      <ProjectName></ProjectName>
      <IncludeValueLists></IncludeValueLists>
      <ReturnStructures></ReturnStructures>
      <AutoCheckout></AutoCheckout>
   </ProjectCodeValues>
</Request>

Parameters

ProjectID or ProjectName

Required. Either ProjectID or ProjectName is required. If ProjectID is specified, the PDS ignores ProjectName.

IncludeValueLists

Optional. If the IncludeValueLists parameter is set to 1, then the PDS will also include enterprise custom fields with value lists in the reply. IncludeValueLists defaults to 0.

ReturnStructures

Optional. If the ReturnStructures parameter is set to 1, the PDS also returns outline code value list structures and values.

AutoCheckout

Optional. If the AutoCheckout parameter is specified, the PDS attempts to check out the project.

Return Value

If the enterprise code values are successfully gathered, and the project check-out is successful (if requested), the method returns a successful HRESULT and STATUS. The return includes the enterprise outline code values and the enterprise custom field values for the requested project. Graphical custom field values are returned, with the exception of duration and flag custom fields.

If the optional ReturnStructures parameter is set to 1, ProjectCodeValues also returns the code structures (but not the masks) as if the EnterpriseOutlineCodes method was called with a CodeType of 0. If the requested project checkout or information collection fails, the entire request fails, and an appropriate error code is returned. If the ProjectID is specified, the return includes the ProjectName and vice versa.

<Reply>
   <HRESULT></HRESULT>
   <STATUS></STATUS>
   <UserName></UserName>
   <ProjectCodeValues>
      <ProjectID></ProjectID>
      <ProjectName></ProjectName>
      <ProjectCheckedout></ProjectCheckedout>
      <ProjectCheckedoutUser></ProjectCheckedoutUser>
      <CurrencySymbol></CurrencySymbol>
      <CurrencyPosition></CurrencyPosition>
      <CurrencyDigits></CurrencyDigits>
      <Columns>
         <Column>
            <Type></Type>
            <UID></UID>
            <Name></Name>
            <SelectionRequired></SelectionRequired>
            <ValueUID></ValueUID>
            <Value></Value>
            <ValueList>
               <ValueItem>
                  <ValueUID></ValueUID>
                  <Phonetic></Phonetic>
                  <Description></Description>
                  <Value></Value>
               </ValueItem>
            </ValueList>
         </Column>
      </Columns>
   </ProjectCodeValues>
</Reply>

Remarks

Request and reply elements that are new or changed since Microsoft Project 2002 are shown in bold. The Phonetic element is returned only in the Japanese version of Microsoft Office Project 2003, or if Phonetic has been set by another PDS call in a non-Japanese language.

The PDS checks Project Server security for the currently logged-on user, and determines if that user is a valid Project Server user. If AutoCheckout is specified, the PDS ensures that the currently logged-on user has sufficient permission to check out the requested project, and that the project is not currently checked out. If permissions are adequate, the PDS marks the project as checked out by the current user. This method does not grant access to the project in the security table (see ProjectsAccess).

ProjectCodeValues is valid for a single version of a single project at a time. If enterprise outline code values for multiple projects are required, you must make multiple calls to this method.

The following table shows the possible values of Type in the Column element of the reply.

Value Column Type
-1 ctUnknown
0 ctCode
1 ctText
2 ctNumber
3 ctDate
4 ctWork (not supported)
5 ctFlag (not supported)
6 ctCost
7 ctDuration (not supported)
8 ctMultiValueCode

Note ProjectCodeValues does not return enterprise custom fields for work, flag, or duration.

For custom fields of type cost (Type is 6), the returned Value is shown multiplied by 100; that is the cost assigned to the project. If ReturnStructures is set to 1 in the request, the reply includes the ValueList of the custom field structure. Value in the value list items shows the actual cost. In the following example, the project is assigned a cost of 4.00 (400 / 100), from the available value list.

 <Reply>
   . . .
        <Column>
            <Type>6</Type>
            <UID>188744529</UID>
            <Name>ProjectCost</Name>
            <SelectionRequired>0</SelectionRequired>
            <Value>400</Value>
            <ValueList>
               <ValueItem>
                  <Value>2.00</Value>
               </ValueItem>
               <ValueItem>
                  <Value>3.00</Value>
               </ValueItem>
               <ValueItem>
                  <Value>4.00</Value>
               </ValueItem>
            </ValueList>
         </Column>
   . . .
<Reply>

Conversion values for the custom field UID are listed in Field ID Values for Enterprise Custom Fields. For example, the column UID 188744529 is Task Enterprise Project Cost1.

 

Show:
© 2014 Microsoft