none
project 2010: how to use the submitStatusForResource RRS feed

  • Question

  • Hi,

    I am looking for a way to modify the acutal working time timphased data for a different resource (not the application user). I have read several documents and the sdk documentation and found out that it is possible using the submitStatusForResource instead of impersonation. I tried it by I keep getting the AssignmentUidInvalid. I can't figure out what is going wrong. This is my code:

                changeXml.Append("<Changes>");
                changeXml.Append("<Proj ID=\"" + projectGUID.ToString() + "\">");
                changeXml.Append("<Assn ID=\"CA669AEB-F00E-4A69-B06B-BEA3F5180420\" ResID= \"97BAB1D2-6177-4991-BA35-6244F90995A0\">");
                changeXml.Append("<PeriodChange PID=\"" + pidActualWrk + "\" Start=\"2011-05-06T08:00:00\" End=\"2011-01-01T17:00:00\">3</PeriodChange>");
                changeXml.Append("</Assn>");
                changeXml.Append("</Proj>");
                changeXml.Append("</Changes>");

                statusing.UpdateStatus(changeXml.ToString());
                statusing.SubmitStatusForResource(resourceGUID, null, "");

    Is it correct? Should I call the updateStatus and then the SubmitStatusForResource just like I did? What may be causing this error? Please also advise were can I find an example in which the submitStatusForResource method is used.

    Regards, George

    • Changed type geo_d Tuesday, February 1, 2011 2:19 PM
    Wednesday, January 26, 2011 6:31 AM

All replies

  • Did you ever find a solution for this error code?   I'm getting the same error message and cannot find the source issue.  Any help would be appreciated.

    Error: The following problem occurred: System.Web.Services.Protocols.SoapException: ProjectServerError(s) LastError=AssignmentUidInvalid Instructions: Pass this into PSClientError constructor to access all error information
       at Microsoft.Office.Project.Server.WebService.Statusing.SetAssignmentWorkData(String changeXML)
    Error: There were problems during transfer of project

    Thursday, March 10, 2011 8:24 PM
  • Actually, I never found the solution for this error but I used a workaround. I used the statusing.SubmitStatus method instead of the statusing.SubmitStatusForResource. But the statusing.SubmitStatus can not be used for assignments that involve other resources than the application's user but you can make it work by setting the "Assignment Owner" of this particular assignment to be the resource currently using the application. If the "Assignment Owner" is the same resource as the application's user, then you are able to use the submitStatus freely.

    Hope this helps.
    Friday, March 11, 2011 6:28 AM
  • Hi George,

    if you instantiate the statusingclient you must impersonate the AssignmentOwner in order to call the UpdateStatus method, for the SubmitStatusForResource you can use the service/application credentials. So maybe you´ve to use two statusingclient instances or you use the SubmitStatus method instead of SubtmitStatusForResource.

    Greets
    Maik

     

     

    Thursday, March 17, 2011 6:15 AM
  • hi geo_d,

    i think that if you submit ASSN ID, you can not use also RES ID.

    I see in SDK sample and, in fact, there's this changeXML:

    changeXml.AppendFormat("<Changes><Proj ID=\"{0}\">", projectUid.ToString());
                changeXml.AppendFormat("<Assn ID=\"{0}\">", assn.ToString());
                string pidPctWorkComplete = PSLibrary.AssnConstID.s_apid_pct_wrk_complete.ToString(System.Globalization.CultureInfo.InvariantCulture);
                string pidOvertimeWork = PSLibrary.AssnConstID.s_apid_ovt_work.ToString(System.Globalization.CultureInfo.InvariantCulture);
                changeXml.AppendFormat("<Change PID=\"{0}\">{1}</Change>", pidPctWorkComplete, "50");
                changeXml.AppendFormat("<Change PID=\"{0}\">{1}</Change>", pidOvertimeWork, 60*10000*8);// 8 hours
                changeXml.Append("</Assn></Proj></Changes>");
    

    without reference for RES ID.

    I think that RES ID in same ASSN ID XML block bring to fail.

    I hope this can helps you,

    Best Regards

    Paolo O.

    • Proposed as answer by Jan R. Cirpka Thursday, March 1, 2012 8:41 AM
    Friday, February 24, 2012 6:56 PM