Attachments in web enabled form - InfoPath Dev
in

InfoPath Dev

Attachments in web enabled form

Last post 03-10-2013 12:59 AM by tejis. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 03-05-2013 04:17 PM

    • tejis
    • Not Ranked
    • Joined on 03-05-2013
    • Posts 2

    Attachments in web enabled form

    Hi, I am very new to InfoPath so don't have detailed information on how certain things work. Your patience will be greatly appreciated.

    Currently we are developing an InfoPath form with an attachment control inside. The form is submitted to a SharePoint 2010 form libary. The user has restrcited contribute permissions to the library, i.e. Contribute permissions but have taken out Edit and Delete items. So the user can't edit or delete an exsting item.

    When the user submit the form without an attachment, everything works fine and as expeted and the form is submited into the library.

    However, when a file is attached into the form, at submit the user gets a message as below and the form freezes.

    The form cannot be submitted because of an error.

    Click OK to resume filling out the form. You may want to check your form data for errors.

    The form cannot be submitted to the specified SharePoint list or document library. The SharePoint location may be read-only or you may not have permissions to access it.

    Interestingly the form is submitted with all data and attachment inside to the form library. So the message seems to be a false message. If I change the user permission to include edit as well, then it works fine too.

    I would like to know what difference does having and not having an attachment makes on how the form is submitted back into the libaray? Because even with the message the form and the attachment are successfully submitted back. Is there another operation after the submit which tries to edit something?

    Any informaiton will be greatly appreciated. Thanks in advance.

    T

  • 03-09-2013 01:37 PM In reply to

    Re: Attachments in web enabled form

    Hi T and welcome!

    I recommend creating an out-of-box workflow with an Impersonation Step that removes the permissions of the XML file when it is added. In other words, give users permissions to write and add to the library but the workflow will remove the edit permissions after the XML is submitted. That may be a way around this issue.

    I have not seen this issue before and I'm not sure why it is happening. You could look at your SharePoint logs for more information, but I think the workflow is a better practice. You could also have two separate libraries and move the form from the "staging" one to the "read-only" one and then expose web parts for both libraries on the same page.  Here the workflow would not remove permissions but rather copy the form item to the new library and then delete it from the old. You'd want to publish your InfoPath form as a content type that both libraries include to make the publish step unified for both.

    Good luck!

    Patrick Halstead
    Project Manager at Qdabra
  • 03-10-2013 12:59 AM In reply to

    • tejis
    • Not Ranked
    • Joined on 03-05-2013
    • Posts 2

    Re: Attachments in web enabled form

    Thanks Patrick, will try and see if it works.
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.