Hi folks,
The scenario is that I have a SharePoint task list which I have successfully synced with Project Server.
When I add a task or update the properties of the task on the SharePoint side, the call toSyncProjectWithWss works like a charm.
If I delete a task in SharePoint and then initiate the sync, the server returns an error. In the ULS log, I see the following:
Exception occurred in method Microsoft.Office.Project.Server.BusinessLayer.Project.SyncProjectWithWssSystem.Data.DeletedRowInaccessibleException: Deleted row information cannot be accessed through the row.
at System.Data.DataRow.GetDefaultRecord()
at System.Data.DataRow.get_Item(DataColumn column)
at Microsoft.Office.Project.Server.Schema.ProjectDataSet.TaskCustomFieldsRow.get_TASK_UID()
at Microsoft.Office.Project.Server.BusinessLayer.Sync.PSTaskCollection.<AddRequiredCustomFields>b__14(TaskCustomFieldsRow tcf)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Collections.Generic.HashSet`1.UnionWith(IEnumerable`1 other)
at System.Collections.Generic.HashSet`1..ctor(IEnumerable`1 collection, IEqualityComparer`1 comparer)
at Microsoft.Office.Project.Server.Library.PSUtility.ToSet[TBase](IEnumerable`1 enumerable)
at Microsoft.Office.Project.Server.BusinessLayer.Sync.PSTaskCollection.AddRequiredCustomFields()
at Microsoft.Office.Project.Server.BusinessLayer.Sync.PSTaskCollection.CommitChanges()
at Microsoft.Office.Project.Server.BusinessLayer.Sync.ProjectWssSyncEngine.SyncProjectWithWssInternal()
at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2()
at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)
at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param)
at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode)
at Microsoft.Office.Project.Server.BusinessLayer.Sync.ProjectWssSyncEngine.SyncProjectWithWss(SyncDataSet syncDataSet, String projectName)
at Microsoft.Office.Project.Server.BusinessLayer.Project.DoSync(SyncDataSet syncDataSet, String projectName)
at Microsoft.Office.Project.Server.BusinessLayer.Project.SyncProjectWithWss(Guid syncEntityUid, SyncEntityUidType syncEntityUidType)
at Microsoft.Office.Project.Server.Wcf.Implementation.ProjectImpl.SyncProjectWithWss(Guid syncEntityUid, SyncEntityUidType syncEntityUidType) adf29347-b823-4a9c-9afd-0b29b0f0dbb1
The error is a low level System.Data error, which leads me to believe that this is a problem with the core implementation of the SyncProjectWithWss method. The error also occurs when a sync is initiated from the UI when a task is deleted.
I wonder if this is simply not supported (sync after deleting an item)? Or is there a workaround for the case where there is a delete? Or is there perhaps a configuration issue?
thinktastic.com | charliedigital.com | linkedin.com/in/charlescchen