locked
InfoPath 2007 form opens from SharePoint 2007 library as read-only without warning RRS feed

  • Question

  • Hi Experts

    We are using MOSS2007 Standard Edition and Office 2007.

    I have a SharePoint library containing both Excel Documents and InfoPath forms, which requires check in and check-out.

    If a user clicks on the URL of an Excel document without first checking it out, he receives a warning that it is read-only and a check-out button.

    If he does the same with an InfoPath 2007 form, it simply opens in the InfoPath client as Read-only without warning (except for the not very visible "[Read-Only]" after the file name at the top of the screen). It is then possible to edit the form, but not to save the edits

     

    Is there any way to make a check-out-and-edit button which is shown when the URL is clicked? Or at least to make a more visible warning that the form is read-only.

    I also want to send the URL link in a workflow, but when the recipient clicks on it, it just opens as read-only (Is it possible to make the URL link to check out and edit?)

    Thanks

    Trevor

    • Moved by Mike Walsh FIN Tuesday, May 3, 2011 11:17 AM InfoPath related (From:SharePoint - Design and Customization (pre-SharePoint 2010))
    Tuesday, May 3, 2011 10:52 AM

Answers

  • Thanks both for your replies

    Solution found:

    The workflow can send a link which the user clicks on, which then starts another workflow to checkout the document to the current user (initiator of the second workflow).

    The following C# form code gives a pop-up warning if the form is inadvertently opened in Read-only mode

    public

    void FormEvents_Loading(object sender, LoadingEventArgs e)

    {

     

       if (this.ReadOnly)

       {

     

          MessageBox.Show("Form is read only. Form is not checked out or is open by another user");

       }

    }

    This is a bit cumbersome, so we will be reviewing whether the check-in and check-out are really necessary. However the workflows are performing better if we require check-in, but that's another story!

    Thanks & Regards

    Trevor

    Wednesday, May 4, 2011 3:23 PM

All replies

  • Trevor, InfoPath is not meant to be used this way.  InfoPath is based on a template, which should never be visible or clickable, and InfoPath forms should not be mixed with other document types.  InfoPath is only for form libraries where there is an embedded template (XSN) that the form library uses to render the data form (XML).  You're trying to use it in a much different way that's not intended, and they don't provide the same type of interaction as regular Office files like Excel and Word.
    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
    Wednesday, May 4, 2011 6:53 AM
  • Thanks for your response.

    What I actually meant was "I have a SharePoint library containing both Excel Documents and XML Documents based on InfoPath forms. The actual XSN  forms (and the other office documents) are published to SharePoint content types, which are added to the library. For business reasons we sometimes want to use a form, sometimes an Office document with a DIP panel, but the business processes are the same

    We may have to reconsider what we are doing.

    But is it at least possible to get the Read-Only or Checked-Out-To status of the XML-document, either via a rule or code, so that we can display it to the more visibly to the user?

    Currently if the user clicks on the URL link in the library to open an XML document, it only shows [read-only] together with the file name at the top of the document window. A user can easily oversee this and make changes to the document (via the InfoPath form) which he/she is then unable to save.

    This issue would be the same whether or not there were other types of office documents in the library.

    Regards

    Trevor

    Wednesday, May 4, 2011 1:18 PM
  • I personally don't require checkout the libraries that contain my IP forms.  SharePoint talks to Microsoft Office behind the scenes and has a hidden "checkout" status that recognizes when the form is open.  This is the SPCheckOutStatus property (in SP 2010 it's just CheckOutStatus).  When a user opens a form that is currently opened in edit mode they will get a message saying that it is opening in read-only because another user already has the form open.  When a user opens a form that is not currently open by anyone else it will simply open in edit mode and sets this checkoutstatus behind the scenes.

    Also, if someone tried to checkout a document that's not physically checked out, but someone has it open in edit mode SharePoint will tell them they cannot check it out because it's currently checked out by domain\user - even though this is the hidden checkoutstatus & the document does not show it is checked out (no little green arrow on the document icon). 

    I really hope that made sense.  Please let me know if you need to me to clarify.  To sum it up, removing the checkout requirement would make this a little smoother for you and it would still protect the document from being edited by multiple users simultaneously.

    Wednesday, May 4, 2011 1:48 PM
  • Thanks both for your replies

    Solution found:

    The workflow can send a link which the user clicks on, which then starts another workflow to checkout the document to the current user (initiator of the second workflow).

    The following C# form code gives a pop-up warning if the form is inadvertently opened in Read-only mode

    public

    void FormEvents_Loading(object sender, LoadingEventArgs e)

    {

     

       if (this.ReadOnly)

       {

     

          MessageBox.Show("Form is read only. Form is not checked out or is open by another user");

       }

    }

    This is a bit cumbersome, so we will be reviewing whether the check-in and check-out are really necessary. However the workflows are performing better if we require check-in, but that's another story!

    Thanks & Regards

    Trevor

    Wednesday, May 4, 2011 3:23 PM
  • Yes, you're right that is another story  :)  Post that in the workflow section when you're ready and I'll keep an eye out for it to tell you how I get around that.  Glad you found an answer.
    Wednesday, May 4, 2011 5:40 PM
  • Try this no-code approach: Check that Form Out (or in) Automatically!
    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
    Thursday, May 5, 2011 12:15 AM
  • That's an offer I can't refuse!

    Thanks Mel, I'll do that.

    Thursday, May 5, 2011 5:53 AM
  • Thanks Clayton.

    I'd already seen that one, but we're using the InfoPath client, not browser forms, and unfortunately we're still using 2007 version.


    Thursday, May 5, 2011 5:58 AM
  • Thursday, May 5, 2011 9:55 AM