ResourceCodeValuesUpdate Method

Description

The PDS updates enterprise outline codes and custom fields for a resource, in Microsoft Office Project Server 2003.

There are three forms of the Column XML syntax, for fields of the following types:

  • Enterprise Resource Outline Code (EROC)

  • Enterprise Resource Custom Fields

  • Enterprise Resource Multi-Value code (ERMV)

The PDS checks the Column UID for the type of field; incorrect choice of syntax results in an error.

A single call to ResourceCodeValuesUpdate can include multiple values for Enterprise Resource Outline Codes and custom fields, and for Enterprise Resource Multi-Value code fields, provided that the correct XML syntax for Column is used for each field type.

The PDS checks whether the Column UID is a custom field, Enterprise Resource Outline Code (EROC) or an Enterprise Resource Multi-Value code (ERMV). The PDS applies the XML stream to the list of values for the correct field type.

Note If the updates are to ERMV or EROC values, the XML tag is <ValueUID>; for custom fields the tag is <Value>. If the Column UID does not match the type of field, the PDS returns an error.

Syntax

<Request>
   <ResourceCodeValuesUpdate>
      <ResourceUID></ResourceUID>
      <ResourceName></ResourceName>
      <AutoCheckin></AutoCheckin>
      <Columns>
      <!--Column XML syntax for EROC and Custom Fields -->
         <Column>
            <UID></UID>
            <Value></Value>       <!--Custom Field -->
            <ValueUID></ValueUID> <!--EROC -->
         </Column>
         <!--Column XML Syntax for ERMV codes-->         <Column>            <UID></UID>            <Items>               <Item>                  <ValueUID></ValueUID>               </Item>            </Items>         </Column>
      </Columns>
   </ResourceCodeValuesUpdate>
</Request>

Parameters

ResourceUID* or *ResourceName

Required. Either the resource ID or the resource name is required. If ResourceUID is specified, ResourceName is ignored.

AutoCheckin

Optional. If AutoCheckin is set to 1, the PDS also marks the resource as checked in.

Columns

A stream of XML that represents the updated Enterprise Resource Outline Code and the Enterprise Resource Custom Field values.

The UID is required for each column, and must match the field type. Conversion values for column UID are listed in Field ID Values for Enterprise Custom Fields. See the limitations in Remarks.

Note Custom fields that have graphical indicators or are formula types are not supported.

Return Value

If the PDS successfully updates the Enterprise Resource Outline Code values, and the resource is checked in (if requested), ResourceCodeValuesUpdate returns a successful HRESULT and STATUS. If the resource check-in or information update fails, the entire request fails and returns an appropriate error code.

<Reply>
   <HRESULT></HRESULT>
   <STATUS></STATUS>
   <UserName></UserName>
</Reply>

Remarks

Request and reply elements that are new or changed since Microsoft Project 2002 are shown in bold.

The PDS checks Project Server security determines whether the logged-on user has valid Project Server permissions. The PDS also ensures that the resource is currently checked out to the current user.

The PDS reads the Columns parameters, and updates the appropriate enterprise outline code field values in the database. The PDS only updates fields that are valid enterprise outline code fields, and non-graphical indicator enterprise custom field values.

NoteResourceCodeValuesUpdate does not support enterprise custom fields for work, flag, or duration. For example, if you include a UID of 205521386, which corresponds to Resource Enterprise Duration5, ResourceCodeValuesUpdate does not update that enterprise custom field and does not return an error. You need to use Project Professional to update work, flag, or duration enterprise resource custom fields.

ResourceCodeValuesUpdate does not revoke access to the resource in the security table (see ResourcesAccessCompleted).

ResourceCodeValuesUpdate is valid for a single resource at a time. Use multiple calls to this method for multiple resources.