none
project server 2010: check if project is checkedout RRS feed

  • Question

  • Hi,

    Is there a way to check if a project is already checkedout (a PSI function perhaps)? Because I have several checkins and checkouts for the same project and I am sometimes getting the CICOCheckedOutInAnotherSession so I need a code to check if the project is already checked out before I check it out again.

    Thanks,
    George
    Thursday, February 17, 2011 1:53 PM

Answers

  • Hi George,

    if you read the project/project status with PSI you can check the Project table if the PROJ_CHECKOUTBY column has a value (row.IsPROJ_CHECKOUTBYNull()).

    Greets
    Maik 

    • Marked as answer by geo_d Monday, February 21, 2011 7:57 AM
    Monday, February 21, 2011 7:22 AM

All replies

  • Hi George,

    Use a try -- catch block, with
    catch(FaultException fault)
    {
    ...
    }

    Then write yourself an error message if the error is CICOCheckedOutInAnotherSession. For an example, see QueueCrteateProject.

    Alternately, catch the exception, and then offer to force check-in (and potentially lose work in the other session). ProjTool has examples, if you can wade through it's source.


    Jim Corbin [MSFT]
    • Proposed as answer by Jim Corbin Friday, February 18, 2011 12:34 AM
    Thursday, February 17, 2011 2:57 PM
  • Hi Jim,

    This is useful but I need something to check if the project is already checkedout then wait for the project to get checkedin so that I will be able to checkout the project again. Do you think this is possible? How?

    Thanks,
    George

    Friday, February 18, 2011 6:53 AM
  • Hi George,

    if you read the project/project status with PSI you can check the Project table if the PROJ_CHECKOUTBY column has a value (row.IsPROJ_CHECKOUTBYNull()).

    Greets
    Maik 

    • Marked as answer by geo_d Monday, February 21, 2011 7:57 AM
    Monday, February 21, 2011 7:22 AM