none
Check Out Error in PSI Code (CICOCheckedOutInOtherSession = 10103) trying to save a custom enterprise field RRS feed

  • Question

  • HI All,

    I've been recomended to ask the question here...

    I'm developing a custom Webpart, that inside a PDP, is trying to save the customEnterprise field values to the Project Server 2010....

    Part of the code im using is the following. It works perfectly when the Project is Checked IN and i execute it

    from a .dll or console aplication:

    ..........
    Guid sessionUid = Guid.NewGuid();

                project.CheckOutProject(projectId, sessionUid, "Updating CF");
                Guid jobUid = Guid.NewGuid();
                project.QueueUpdateProject(jobUid, sessionUid, projectDs, false);
                jobUid = Guid.NewGuid();
                project.QueueCheckInProject(jobUid, projectId, false, sessionUid, "Updating CF");

    ..............

    The problem is that i'm trying to insert this code in the CheckIN Event of the project for example..., or overwritting the save button functionality....

    In that moment, obviously, the project is in CheckOut state, then i get this error code...  (CICOCheckedOutInOtherSession = 10103)

    What is the strategy for solving that problem??? Am i  missing any possibility in the code?? May be getting the current SessionID or JobUID, is this possible??

    I was thinking to launch some kind of retarded sharepoint timer, for waiting for the process of Checking in to be completed, before executing that code...

    Very Thanks in advance...


    Savuton

    Saturday, October 13, 2012 1:05 PM

All replies

  • Hi,

    I am guessing because you are doing this inside of the PDP infrastructure that the project is already checked out when you choose the edit the page. The trick of writing your own code for the PDP webparts is to hook into the Edit and Save events of the PDP infra, not write your own.

    There was a nice blog post on this over at http://blogs.msdn.com/b/husainzgh/archive/2011/08/01/hooking-into-the-project-detail-page-ribbon-save-button-without-overriding-out-of-box-functionality-in-project-web-access-for-project-server-2010.aspx that may be able to help.


    Alex Burton
    www.epmsource.com | Twitter
    Project Server TechCenter | Project Developer Center | Project Server Help | Project Product Page

    Sunday, October 14, 2012 3:07 AM
    Moderator
  • You need to piggyback onto the sessionUid of the alreday checked out project. To get hold of this can be challenging. What is your scnerario?

    Jan Cirpka

    Monday, October 15, 2012 7:23 AM
  • Hi all,

    The idea is creating a custom Form WebPart that saves/loads various EnterPrise Custom Fields, a kind of Entering Form, for the final user. I dont want to use the standard component that comes with PS2010, for a more flexible layout/image...

    My idea was saving in the checkin Event, o overwriting the Save Functionality, like Alexander commented..

    I did but , I encountered the (CICOCheckedOutInOtherSession = 10103) problem, using my code above...

    Is it difficult to join/recover to the current SessionUID, for being able to  save??

    If it's difficult, what are the workarounds, with a scenario like that??

    Very thanks! to all

    Carlos


    Savuton

    Monday, October 15, 2012 8:34 AM
  • I now see that your code starts with a ceckout - that obviously fails if the project is checked out. This check is likely done before the action to check out is placed on the queue. So you could skip this one, but than the interesting challenge is the QueueUpdate - that action will be placed on the queue - but that queue already has the CheckIn action in place. So I guess that your QueueUpdate will fail within the Queue handling. Are you with me? The CheckIn event is really only intended to inspect and cancel, not to update the dataset.

    So you could place your code in the CheckedIn event - and take care (e.g. using a special comment (the PROJ_SESSION_DESCRIPTION property) of the CheckIn/CheckedIn event that is causes by this additional round.  The other option you may wish to try is to cancel the CheckIn event at the end and piggyback on the session, which you can get hold of using ReadProject and using PROJ_SESSION_UID (http://msdn.microsoft.com/en-us/library/websvcproject.projectdataset.projectrow.proj_session_uid(v=office.12).aspx). In that scenarion you need to ensure to impersonate as the user that has done the checkout using PROJ_CHECKEDOUTBY (http://msdn.microsoft.com/en-us/library/websvcproject.projectdataset.projectrow.proj_checkoutby(v=office.12).aspx). At the end you need to CheckIn - and again, distinguish for the canceling. Even though it is said that , which now cannot be done through the comment, as this is a read-only property. Both routes are quite some work and clearly on the boundaries of supported area. Definitely take a good look at the performance consequences.


    Jan Cirpka

    Monday, October 15, 2012 7:47 PM