R
Rich Gruber
Hello
I am trying to get up to speed with Project Server 2007 Beta 2.
Using the PSI methods, I can create and publish a new project.
When I try to add a task to this project though, I get the following error
(SOAP exception)
ProjectServerError(s) LastError=GeneralOnlyUpdatesAllowed
The code I used is:
Note: 'taskName' is passed in as a variable.
project.CheckOutProject(projID, sessionGuid, "Checked out by [Application
name] for update");
ProjectRef.ProjectDataSet dsProject = GetSingleProjectData(projID);
ProjectRef.ProjectDataSet.TaskRow taskRow = dsProject.Task.NewTaskRow();
taskRow.PROJ_UID = dsProject.Project[0].PROJ_UID;
taskRow.TASK_UID = Guid.NewGuid();
taskRow.TASK_NAME = taskName;
dsProject.Task.AddTaskRow(taskRow);
project.QueueUpdateProject(projID,sessionGuid,dsProject,false);
Does anyone know what I am doing wrong? A working example would be
appreciated, since the SDK documentation is vague, saying only that you must
use QueueCreateProject(), or QueueUpdateProject() to actually create the
Task.
Thanks in advance!
I am trying to get up to speed with Project Server 2007 Beta 2.
Using the PSI methods, I can create and publish a new project.
When I try to add a task to this project though, I get the following error
(SOAP exception)
ProjectServerError(s) LastError=GeneralOnlyUpdatesAllowed
The code I used is:
Note: 'taskName' is passed in as a variable.
project.CheckOutProject(projID, sessionGuid, "Checked out by [Application
name] for update");
ProjectRef.ProjectDataSet dsProject = GetSingleProjectData(projID);
ProjectRef.ProjectDataSet.TaskRow taskRow = dsProject.Task.NewTaskRow();
taskRow.PROJ_UID = dsProject.Project[0].PROJ_UID;
taskRow.TASK_UID = Guid.NewGuid();
taskRow.TASK_NAME = taskName;
dsProject.Task.AddTaskRow(taskRow);
project.QueueUpdateProject(projID,sessionGuid,dsProject,false);
Does anyone know what I am doing wrong? A working example would be
appreciated, since the SDK documentation is vague, saying only that you must
use QueueCreateProject(), or QueueUpdateProject() to actually create the
Task.
Thanks in advance!