T
Tim Andrews
I can modify a project, reassign resources, etc. no problem but anytime I try
to update the TaskDataTable by either modifying an existing record or adding
a new one, I get an error during the QueueUpdateProject process,
"GeneralOnlyUpdatesAllowed". I just loaded the Dec. '08 hotfixes for
Sharepoint and Project Server but that didn't help. Here is the code minus
the helper functions that access the web services and manage the queue, which
as far as I can tell are not the problem.
Sub ModifyTask(ByVal PROJ_UID As Guid)
Dim proj As ProjectDataSet = projsvc.ReadProject(PROJ_UID,
DataStoreEnum.PublishedStore)
Dim projdata As ProjectDataSet.ProjectRow =
proj.Project.FindByPROJ_UID(PROJ_UID)
Dim projtask As ProjectDataSet.TaskDataTable = proj.Task
Dim upd_jobid As Guid = Guid.NewGuid
projsvc.CheckOutProject(PROJ_UID, sessionid, "Test Task")
'Create new task
Dim TASK_UID As Guid = Guid.NewGuid
Dim taskrow As ProjectDataSet.TaskRow = projtask.NewTaskRow
taskrow.PROJ_UID = PROJ_UID
taskrow.TASK_UID = TASK_UID
taskrow.TASK_NAME = "Test Task"
taskrow.PROJ_NAME = projdata.PROJ_NAME
taskrow.TASK_DUR_FMT = PSLibrary.Task.DurationFormat.Hour
taskrow.TASK_DUR = 4800
taskrow.TASK_START_DATE = Now()
taskrow.AddPosition = PSLibrary.Task.AddPositionType.Last
projtask.AddTaskRow(taskrow)
'This is where I get the error "GeneralOnlyUpdatesAllowed":
projsvc.QueueUpdateProject(upd_jobid, sessionid, proj, False)
q.WaitForQueue(upd_jobid)
'Check in project
Dim checkin_jobid As Guid = Guid.NewGuid
projsvc.QueueCheckInProject(checkin_jobid, PROJ_UID, False,
sessionid, "Test Task")
q.WaitForQueue(checkin_jobid)
'Publish project
Dim publish_jobid As Guid = Guid.NewGuid
projsvc.QueuePublish(publish_jobid, PROJ_UID, True, Nothing)
q.WaitForQueue(publish_jobid)
End Sub
I even wrote out the project dataset before and after the update and
compared the differences, the only thing that changes is the addition of the
following data:
It shouldn't be a permissions issue as I have full control of the server and
I even created this project myself. Any ideas would be greatly appreciated.
Thanks,
TIM
to update the TaskDataTable by either modifying an existing record or adding
a new one, I get an error during the QueueUpdateProject process,
"GeneralOnlyUpdatesAllowed". I just loaded the Dec. '08 hotfixes for
Sharepoint and Project Server but that didn't help. Here is the code minus
the helper functions that access the web services and manage the queue, which
as far as I can tell are not the problem.
Sub ModifyTask(ByVal PROJ_UID As Guid)
Dim proj As ProjectDataSet = projsvc.ReadProject(PROJ_UID,
DataStoreEnum.PublishedStore)
Dim projdata As ProjectDataSet.ProjectRow =
proj.Project.FindByPROJ_UID(PROJ_UID)
Dim projtask As ProjectDataSet.TaskDataTable = proj.Task
Dim upd_jobid As Guid = Guid.NewGuid
projsvc.CheckOutProject(PROJ_UID, sessionid, "Test Task")
'Create new task
Dim TASK_UID As Guid = Guid.NewGuid
Dim taskrow As ProjectDataSet.TaskRow = projtask.NewTaskRow
taskrow.PROJ_UID = PROJ_UID
taskrow.TASK_UID = TASK_UID
taskrow.TASK_NAME = "Test Task"
taskrow.PROJ_NAME = projdata.PROJ_NAME
taskrow.TASK_DUR_FMT = PSLibrary.Task.DurationFormat.Hour
taskrow.TASK_DUR = 4800
taskrow.TASK_START_DATE = Now()
taskrow.AddPosition = PSLibrary.Task.AddPositionType.Last
projtask.AddTaskRow(taskrow)
'This is where I get the error "GeneralOnlyUpdatesAllowed":
projsvc.QueueUpdateProject(upd_jobid, sessionid, proj, False)
q.WaitForQueue(upd_jobid)
'Check in project
Dim checkin_jobid As Guid = Guid.NewGuid
projsvc.QueueCheckInProject(checkin_jobid, PROJ_UID, False,
sessionid, "Test Task")
q.WaitForQueue(checkin_jobid)
'Publish project
Dim publish_jobid As Guid = Guid.NewGuid
projsvc.QueuePublish(publish_jobid, PROJ_UID, True, Nothing)
q.WaitForQueue(publish_jobid)
End Sub
I even wrote out the project dataset before and after the update and
compared the differences, the only thing that changes is the addition of the
following data:
<Task>
<PROJ_UID>8537388f-0cd0-4ecd-8461-b9f15e1f84a6</PROJ_UID>
<TASK_UID>e2eab3f1-e2b3-447e-900b-a267e9e22e4e</TASK_UID>
<TASK_NAME>Test Task</TASK_NAME>
<TASK_LOCKDOWN_BY_MANAGER>false</TASK_LOCKDOWN_BY_MANAGER>
<TASK_DUR>4800</TASK_DUR>
<TASK_DUR_FMT>5</TASK_DUR_FMT>
<TASK_START_DATE>2009-01-08T15:19:30.108094-08:00</TASK_START_DATE>
<AddPosition>2</AddPosition>
<PROJ_NAME>Tim Test 2</PROJ_NAME>
</Task>
It shouldn't be a permissions issue as I have full control of the server and
I even created this project myself. Any ideas would be greatly appreciated.
Thanks,
TIM