The PDS adds new resources to a specified project, or adds resources from the Enterprise Resource Pool in Microsoft Office Project Server 2003.
The PDS determines the next valid resource unique ID and increments any existing resource IDs to accommodate the new resource. If the EUID is specified, then the PDS also determines the correct name for the enterprise resource from the Enterprise Resource Pool and maps the added resource as an enterprise resource.
If one resource creation fails for any reason, then the entire ProjectResourcesCreate request fails.
ProjectResourcesCreate does not affect entries in the Enterprise Resource Pool. See ResourcesAdd for this functionality.
<Request> <ProjectResourcesCreate> <AutoPublish></AutoPublish> <ProjectID></ProjectID> <ProjectName></ProjectName> <Resources> <Resource> <Name></Name> <Phonetics></Phonetics> <ID></ID> <Type></Type> <EUID></EUID> <BookingType></BookingType> -- Other resource details -- </Resource> </Resources> </ProjectResourcesCreate> </Request>
Other resource details:
- For an enterprise resource, all details will be gathered from the Enterprise Resource Pool.
- The list of supported resource details follows the Project XML Schema.
- ProjectResourcesCreate supports soft-booking for TeamBuilder Lite.
Optional. The default value is 0. If AutoPublish is set to 1, the PDS calls ProjectViewTablesCreate to properly synchronize the project with the Project Server view tables after all of the resources have been added. AutoPublish is set for the entire call.
ProjectID or ProjectName
Required. ProjectResourcesCreate must include either the ProjectID or the ProjectName. If ProjectID is specified, ProjectName is ignored, even if given. ProjectName is the concatenation of the project name and the version name with a period separator (that is, Name.Version).
Name or EUID
Required. Either the resource name or the Enterprise Unique ID is required for at least one resource. If EUID is specified, Name is ignored, even if given.
Optional. The resource identifier number can be specified. Project Server creates a unique ID if it is not specified.
Optional. The default value is 1 (a work resource). Set Type to 0 for a material resource.
Optional. If BookingType has a value of 1, the resource is soft-booked onto the project (that is, proposed). If BookingType is omitted or has any other value, the resource is hard-booked onto the project (committed).
Optional. The Phonetics parameter contains phonetic information in either Hiragana or Katakana for resource names; it is used only in the Japanese version of Microsoft Office Project 2003.
Other resource details are optional.
If the requested resource creation is successful, the method returns a successful HRESULT and STATUS.
<Reply> <HRESULT></HRESULT> <STATUS></STATUS> <UserName></UserName> </Reply>
The PDS checks Project Server security for the currently logged-on user and determines whether the user is a valid Project Server user and whether the user has the requested project checked out. If so, then the PDS checks each resource name for valid characters and formatting.
For an enterprise resource, the PDS checks security to ensure that the user has permission to add that resource to a project.
The PDS adds the resource or resources directly into the Project Server database for the specified project.