none
Remove resource from Project Build Team in Project Server 2013 using CSOM RRS feed

  • Question

  • Hi,

    I want to remove an Enterprise resource from Project Build Team in CSOM. How can I do it ?

    I have tried removing the resource from DraftProject.ProjectResources collection and then update the project

    DraftProject.ProjectResources.Remove(resource);

    draftProject.Update(); 

    but it wont get removed. Getting following error:

    PJClientCallableException: ProjectResourceNotFound
    ProjectResourceNotFound
    column = RES_UID
       at Microsoft.ProjectServer.PJClientCallable.HandleCallPSIErrors(PSI psi, PSClientError err, Action`2 onError)
       at Microsoft.Office.Project.PWA.PJContext.HandleTryPSIErrors(UInt32 ulsID, SoapException se, String scopeName, Action`2 onError, Func`1 rethrow)
       at Microsoft.Office.Project.PWA.PJContext.TryPSITag(UInt32 ulsID, String scopeName, Action`1 tryBlock, Action`2 catchBlock, Func`1 rethrow)
       at Microsoft.ProjectServer.PJClientCallable.CallPSITag(UInt32 ulsID, String caller, Action`1 body, Action`2 onError)
       at Microsoft.ProjectServer.PJClientCallable.CallPSITag(UInt32 ulsID, String caller, Action`1 body)
       at Microsoft.ProjectServer.DraftProject.Update()
       at Microsoft.ProjectServer.DraftProjectServerStub.InvokeMethod(Object target, String methodName, XmlNodeList xmlargs, ProxyContext proxyContext, Boolean& isVoid)
       at Microsoft.SharePoint.Client.ServerStub.InvokeMethodWithMonitoredScope(Object target, String methodName, XmlNodeList args, ProxyContext proxyContext, Boolean& isVoid)
       at Microsoft.SharePoint.Client.ClientMethodsProcessor.InvokeMethod(Object obj, String methodName, XmlNodeList xmlargs, Boolean& isVoid)
       at Microsoft.SharePoint.Client.ClientMethodsProcessor.GetObjectFromObjectPath(XmlElement xe)
       at Microsoft.SharePoint.Client.ClientMethodsProcessor.GetObjectFromObjectPathId(String objectPathId)
       at Microsoft.SharePoint.Client.ClientMethodsProcessor.ProcessInstantiateObjectPath(XmlElement xe)
       at Microsoft.SharePoint.Client.ClientMethodsProcessor.ProcessOne(XmlElement xe)
       at Microsoft.SharePoint.Client.ClientMethodsProcessor.ProcessStatements(XmlNode xe)
       at Microsoft.SharePoint.Client.ClientMethodsProcessor.Process()

    Resource is present in the collection, cross verified it.

    Any help in this regard would be really helpful.

    Cheers,

    Amit





    • Edited by Amit C A Monday, February 23, 2015 7:53 AM
    Monday, February 23, 2015 7:24 AM

All replies

  • Hi Amit,

    Does the resource has some actuals in the project? In case it has, you cannot delete or replace a resource with actual work neither with PSI nor CSOM. See reference here.


    Hope this helps,


    Guillaume Rouyre, MBA, MVP, P-Seller |

    Monday, February 23, 2015 11:12 AM
    Moderator
  • Hi,

    No the resource doesn't have any actuals or assignments.

    Cheers,

    Amit

    Monday, February 23, 2015 11:15 AM
  • Thus I'll let experts in CSOM jump in since it is too technical for me.


    Hope this helps,


    Guillaume Rouyre, MBA, MVP, P-Seller |

    Monday, February 23, 2015 11:17 AM
    Moderator
  • Ok thanks.
    Monday, February 23, 2015 11:23 AM