none
Updating Custom Field of Project (having external dependencies) through PSI RRS feed

  • Question

  • Dear All,

          I am updating a custom field in a loop for all projects one by one. It updates, check in and publish the projects with simple schedule but when it tries to update a project with external task dependencies it throws an exception

            <error id="7038" name="TaskCannotEditExternal" uid="dc36b730-ac6b-4772-aec2-764cb7140676" />

          What exactly needs to be done for successfully updating these projects.

    Regards
    Adil


    From Microsoft Forums
    Tuesday, November 29, 2011 10:12 AM

All replies

  • Hi Adil,

    If you are updating the project task which has external dependencies , You may need to check in all the projects.
    here is the similar thread:
    http://social.technet.microsoft.com/Forums/en-US/projserv2010setup/thread/1664d9d2-3035-4706-b399-4b3015cdd860/
    Thanks, Amit Khare |EPM Consultant| Blog: http://amitkhare82.blogspot.com http://www.linkedin.com/in/amitkhare82
    Tuesday, November 29, 2011 10:53 AM
  • Hi Amit,

         All the projects are already checked in. The referred thread is about manually checking in the project and I am doing it through PSI. Also Brain might have the answer to this question as he mentioned in the referred thread that he has already seen this problem through PSI.

    Regards
    Adil


    From Microsoft Forums
    Tuesday, November 29, 2011 11:22 AM
  • Hi Adil,

    Yes, I just wanted to tell the same that Brian mentioned "  I have only seen this error before when making updates to plans using the PSI when there are external links to other tasks."

    Well, the point is, the post is recent & since Brian also confirmed, would suggest to see if anyone has something to add.

     


    Thanks, Amit Khare |EPM Consultant| Blog: http://amitkhare82.blogspot.com http://www.linkedin.com/in/amitkhare82
    Tuesday, November 29, 2011 11:47 AM
  • Hi All,

          Any updates regarding this issue? I tried some other ways but not sure how to update the project. Did anyone write a PSI application to update project custom fields?

    Regards
    Adil


    From Microsoft Forums
    Thursday, December 8, 2011 6:19 AM
  • Hello Adil,

    Please see a post from Brian with sample code:

    http://blogs.msdn.com/b/brismith/archive/2007/12/06/setting-custom-field-values-using-the-psi.aspx
    http://blogs.msdn.com/b/brismith/archive/2010/10/05/project-server-updating-and-deleting-custom-fields-using-the-psi.aspx

    I have implemened without any issues. The steps are:
    1. Use the ReadProjectEntities menthod using project web service & pass the projectuid to get the project dataset
    2. Once you get the projectdataset, you can use the logic to update the custom  fields in projectcustomfields table in project dataset
    3. Use the checkoutProject & checkout the plan (A validation is required if project is already checkout as I mentioned in first reply)
    4. If project is not checkout, use QueueUpdateProject method of project web service & pass the updated projectdatabset.
    5. use the QueueCheckInProject method of  project web service & checkin the plan.

    Optionally, you can also try to  QueuepublishProject to publish the data.

    Hope that helps.


    Thanks, Amit Khare |EPM Consultant| Blog: http://amitkhare82.blogspot.com http://www.linkedin.com/in/amitkhare82
    Thursday, December 8, 2011 8:06 AM
  • Hi Amit,

            Thanks for your input. I went through the links but my problem is not solved yet because it does not discuss updating custom fields of project having external links.

    Regards
    Adil
    From Microsoft Forums
    Wednesday, December 14, 2011 10:24 AM