ProjectSetResourcesBookingType supports Team Builder Lite, which allows a user—such as a project manager who is not using Project Professional—to specify whether resources are hard-booked (committed) or soft-booked (proposed) onto projects. ProjectResourcesBatch can include ProjectSetResourcesBookingType, to set the booking type for any or all resources already on the project.
The PDS changes the booking type directly in the Microsoft Office Project Server 2003 database for each specified resource in the requested project. If one resource change fails for any reason, then the whole ProjectSetResourcesBookingType call fails.
<Request> <ProjectSetResourcesBookingType> <AutoPublish></AutoPublish> <ProjectID></ProjectID> <ProjectName></ProjectName> <Resources> <Resource> <Name></Name> <EUID></EUID> <BookingType></BookingType> </Resource> </Resources> </ProjectSetResourcesBookingType> </Request>
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 booking types have been updated. AutoPublish is set for the entire call.
ProjectID or ProjectName
Required. ProjectSetResourcesBookingType 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 must be given for each resource. If EUID is specified, Name is ignored, even if given.
Required. If BookingType has a value of 1, the resource is soft-booked onto the project (that is, proposed). ProjectSetResourcesBookingType returns an error if BookingType is omitted or has any other value.
If the request is successful, the method returns a successful HRESULT and STATUS.
<Reply> <HRESULT></HRESULT> <STATUS></STATUS> <UserName></UserName> </Reply>
The PDS determines whether the user permissions are valid on Project Server and whether the user has checked out the requested project. The PDS then checks that each resource exists in the project.
The ProjectResourcesBatch method may include multiple calls to ProjectSetResourcesBookingType and other enterprise project resource methods.