none
Update project task using PSI & Statusing WCF RRS feed

  • Question

  • Hi All,

    i'm trying to update specific task property "% completion" using PSI & statusing WCF. but i get the following error:

    ProjectServerError(s) LastError=GeneralUnhandledException Instructions: Pass this into PSClientError constructor to access all error information


    Here is my code:

    Guid ProjUid = PSEventHandlerSample.PSUtility.GetProjectUID("XXXX");         
                Guid taskguid = new Guid("C99A831F-440D-45C9-B7AE-93693BA07FC9");         
                System.Text.StringBuilder changeXml = new System.Text.StringBuilder();
                changeXml.AppendFormat("<Changes><Proj ID=\"{0}\">", ProjUid.ToString());
                changeXml.AppendFormat("<Task ID=\"{0}\">", taskguid.ToString());
                changeXml.AppendFormat("<Change PID=\"{0}\">{1}</Change>", pidPctComplete, "100");
                changeXml.Append("</Task></Proj></Changes>");
                using (OperationContextScope scope = new OperationContextScope(statusingClient.InnerChannel))
                {
                    WcfHelpers.UseCorrectHeaders(false);
                    statusingClient.UpdateStatus(changeXml.ToString());
                }

    Any Help..

    Best Regards,


    Regards, Mohamed Abdel Ghaffar | http://sharepointfoundation2010.blogspot.com
    Sunday, March 6, 2011 1:54 PM

All replies

  • Hi Mohamed,

    in my opinion, you get this error because you can't change pctComplete directly on a task.

    You must change pctComplete on all assingments of that task. In this way also pctComplete of the task will change.

    I hope this can help you,

    Best Regards

    Paolo O.

     

    Friday, March 18, 2011 3:36 PM