ProjectCreate Method

Description

The PDS creates a new project in Microsoft Office Project Server 2003, from details specified in the ProjectCreate request or from an enterprise template.

If the default version of the requested ProjectName does not already exist, then the PDS returns an error. The PDS adds the project directly into the Project Server database. If AutoPublish is set to 1, the PDS also makes the appropriate call to ProjectViewTablesCreate to properly synchronize the new project with the Project Server view tables.

ProjectCreate can optionally include Tasks, Resources, and Assignments, with data in the format returned by ProjectData. For more information, please see project creation details later in this topic.

Syntax

<Request>
   <ProjectCreate>
      <AutoPublish></AutoPublish>
      <Project>
         <ProjectName></ProjectName>
         <StartDate></StartDate>
         <TemplateID></TemplateID>
         <TemplateName></TemplateName>
         -- Other project details --
      </Project>
   </ProjectCreate>
</Request>

Other project details are optional; the order does not matter. Project details include:

<Title></Title>
<Company></Company>
<Author></Author>
<Manager></Manager>
<ScheduleFromStart></ScheduleFromStart>
<FinishDate></FinishDate>
<FiscalYearStart></FiscalYearStart>
<FYStartDate></FYStartDate>
<DefaultStartTime></DefaultStartTime>
<DefaultFinishTime></DefaultFinishTime>
<MinutesPerDay></MinutesPerDay>
<MinutesPerWeek></MinutesPerWeek>
<DaysPerMonth></DaysPerMonth>
<DefaultTaskType></DefaultTaskType>
<DefaultFixedCostAccrual></DefaultFixedCostAccrual>
<DefaultStandardRate></DefaultStandardRate>
<DefaultOvertimeRate></DefaultOvertimeRate>
<DurationFormat></DurationFormat>
<WorkFormat></WorkFormat>
<EditableActualCosts></EditableActualCosts>
<HonorConstraints></HonorConstraints>
<MultipleCriticalPaths></MultipleCriticalPaths>
<NewTasksEffortDriven></NewTasksEffortDriven>
<NewTasksEstimated></NewTasksEstimated>
<SplitsInProgressTasks></SplitsInProgressTasks>
<SpreadActualCost></SpreadActualCost>
<SpreadPercentComplete></SpreadPercentComplete>
<TaskUpdatesResource></TaskUpdatesResource>
<WeekStartDay></WeekStartDay>
<Tasks>
   <Task>
      <Name></Name>
      <ID></ID>
     -- Other Task Data --
   </Task>
</Tasks>
<Resources>
   <Resource>
     -- Resource Data --
   </Resource>
</Resources>
<Assignments>
   <Assignment>
     -- Assignment Data --
   </Assignment>
</Assignments>

Parameters

If TemplateID or TemplateName are specified, the only valid project details are ProjectName, StartDate, and Manager. All other parameters are ignored, even if given.

AutoPublish

Optional. False (0) if the project is not automatically published. The default value is 0. True (1) if the project is automatically published. When AutoPublish is True, ProjectCreate automatically calls the PDS method ProjectViewTablesCreate in order to synchronize the new project with the Project Server view tables.

If a Project Web Access administrator selects AutoCreate WSS, and AutoPublish is set to 1, a site for the new project will also be created on the server that is hosting the Microsoft Windows SharePoint™ Services associated with Project Server.

ProjectName

Required. Returns status information for the specified project name. ProjectName is the project name as stored in the PROJ_NAME field of the MSP_PROJECTS table. ProjectName is the concatenation of the project name and the version name, separated by a period (that is, Name.Version).

StartDate

Required. The project start date is the only required parameter in addition to the project name.

TemplateID* or *TemplateName

Optional. If TemplateID is specified, the TemplateName is ignored, even if given.

Tasks

Optional. The Tasks syntax is defined in ProjectTasksCreate.

Resources

Optional. The Resources syntax is defined in ProjectResourcesCreate.

Assignments

Optional. The Assignments syntax is defined in ProjectAssignmentsCreate.

ScheduleFromStart

Value Description
0 Project Finish Date
1 Project Start Date (default)

FYStartDate

Value Description
1 January (default)
2 February
3 March
4 April
5 May
6 June
7 July
8 August
9 September
10 October
11 November
12 December

DefaultTaskType

Value Description
0 Fixed work. The amount of work remains constant, regardless of any change in duration or the number of resources (Assignment Units) assigned to the task.
1 Fixed units (default). The number of resources (Assignment Units) remains constant, regardless of the amount of work or duration on the task.
2 Fixed duration. The duration of the task remains constant, regardless of the number of resources (Assignment Units) assigned or the amount of work.

WorkFormat

Value Description
3 Minutes
5 Hours (default)
7 Days
9 Weeks
11 Months

DurationFormat

Value Description
3 Minutes
5 Hours
7 Days (default)
9 Weeks
11 Months

DefaultFixedCostAccrual

Value Description
1 Start
2 End
3 Prorated (default)

WeekStartDay

Value Description
0 Sunday (default)
1 Monday
2 Tuesday
3 Wednesday
4 Thursday
5 Friday
6 Saturday

Additional Parameter Rules

  • If FiscalYearStart is specified (that is, set to 1), then FYStartMonth must be greater than 0, or FiscalYearStart will be ignored when Project opens the project.

  • StartDate and FinishDate values may range from 1/1/1984 to 12/31/2049 (inclusive). If a date is passed in outside this range, the PDS returns an invalid date STATUS code. Dates can be entered as YYYYMMDD or YYYYMMDDHHMMSS. If the hours, minutes, and seconds are included, they should be set to the exact day (for example, 20031021000000).

  • Both the Company and Author fields support a maximum of 255 characters.

  • FinishDate is a computed value. Even if a FinishDate is provided, Project will re-calculate the actual FinishDate once the project is opened.

  • SpreadActualCost node value will be ignored if EditableActualCosts node value is not set to 1 (True).

  • EditableActualCosts, EditableActualCosts, SpreadActualCost, SpreadPercentComplete, and TaskUpdatesResource will accept only Boolean values (0 or 1).

  • DefaultStartTime and DefaultFinishTime must include a date and time value in the format YYYYMMDDHHMMSS (for example, 8:00 AM on 9/20/2003 would be 20030920080000) where the time would be in 24-hour format.

Return Values

If the requested project creation is successful, the method returns a successful HRESULT and STATUS as well as the Project ID for the new project.

<Reply>
   <HRESULT></HRESULT>
   <STATUS></STATUS>
   <UserName></UserName>
   <Project>
      <ProjectName></ProjectName>
      <ProjectID></ProjectID>
   </Project>
</Reply>

Remarks

The PDS checks Microsoft Office Project Server 2003 security for the currently logged-on user and determines whether the user is a valid Project Server user and whether the user has permission to create new projects. The ProjectName is checked for valid characters and formatting, and for uniqueness in Project Server. The PDS checks the version part of the name for validity, and ensures that the default version of a project exists before it creates any other version.

Other considerations include the following:

  • The only required parameters to create a new project are the ProjectName and the StartDate.

  • If a template is specified, then it must be an enterprise template stored in the Project Server database.

  • The list of supported project details, including tasks, resources, and/or assignments, follows the Project XML Schema.

  • ProjectCreate only allows for creation of “standard” projects of type 0 (i.e. not templates, Enterprise Global Templates, Administrative, or Enterprise Resources), and only creates one project at a time.

  • For projects created with ProjectCreate, the ProjectPercentComplete field does not show in Project Center views until that project has been opened and saved in Microsoft Office Project Professional 2003.

  • ProjectCreate is not designed to use all data that may be in a project template. If additional data is included other than that listed in the ProjectCreate syntax, that data will be ignored and no error code will be returned.

  • Master projects, inserted projects, and cross project links are not supported.