![]() |
| |||||||
![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
| I am attepting to put together a web application to update selected project tasks on a Project Server 2007 installation. The code I am using is (for the most part) taken directly from the code example in the SDK under the QueueUpdateProject method. I am simply attempting to update the TASK_NAME field on one Task record on an existing project and nothing else. The problem is that upon calling QueueUpdateProject - I am getting error 135 - AssignmentCannotEditSummaryTask for what looks to be several Assignment records. The task I am updating is NOT a summary task. To further complicate things - this error happens even if I comment out the code that makes the change to the project DataSet (not updating the project DataSet at all). Here are the steps I am taking and the results I receive: SCENARIO 1:
SCENARIO 2:
SCENARIO 3: (this Scenario works fine)
And here is the actual code I am using: protected void Button1_Click(object sender, EventArgs e) { q.Url = baseUrl + QUEUEWEBSERVICE; q.Credentials = CredentialCache.DefaultCredentials; Button Button1 = (Button)sender; GridViewRow grdRow = (GridViewRow)Button1.Parent.Parent; Label5.Text = grdRow.Cells[2].Text; //TASK_NAME field int taskId = Convert.ToInt32(grdRow.Cells[8].Text); //TASK_ID field int idx = grdRow.DataItemIndex; //Get the Project ID from the GridView DataKeys collection Label6.Text = GridView2.DataKeys[idx].Value.ToString(); Guid projectId = new Guid(GridView2.DataKeys[idx].Value.ToString()); Guid sessionId = Guid.NewGuid(); Guid jobId = Guid.NewGuid(); //Read the Project Details WebSvcProject.ProjectDataSet projectDs = project.ReadProject(projectId, WebSvcProject.DataStoreEnum.PublishedStore); //Check Out the Project project.CheckOutProject(projectId, sessionId, SESSION_DESC); //Update the Task field on the local DataSet Label7.Text = "DS VALUE : " + projectDs.Task[taskId].TASK_NAME.ToString(); projectDs.Task[taskId].TASK_NAME += " Changed"; //Save the changes project.QueueUpdateProject(jobId, sessionId, projectDs, false); WaitForQueue(q, jobId); // Check in the project jobId = Guid.NewGuid(); project.QueueCheckInProject(jobId, projectId, false, sessionId, SESSION_DESC); WaitForQueue(q, jobId); } I am VERY new to Project Server development so any assistance would be greatly appreciated. Thanks in advance, Rob |
| Sponsored links |
| |
![]() |
| Thread Tools | |
| Display Modes | |
|
|