PSI Error creating Task in existing project

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!
 
D

Dale Howard [MVP]

Rich --

I would recommend you post this question in the
microsoft.public.project.developer newsgroup, as you are more likely to get
an answer there. Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top