Attachments in Infopath disabled - InfoPath Dev
in

InfoPath Dev

Attachments in Infopath disabled

Last post 10-20-2011 10:11 AM by Hilary Stoupa. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 03-26-2010 05:17 AM

    Attachments in Infopath disabled

    Hi,

    I am facing an issue with managing the attachments in the Infopath templates, to be used in my Windows Forms. The solution is created using .Net 3.5 (language c#)

    I have 1 template exposed which a user with certain rights opens and fills in the details and also attaches a word file to it. Once the attachment is added, this particular user can edit, delete, cut, copy this attachment.

    Once the user submits this template for approval to the next level and the approver logs in, he/she views the template fillled up by the user. This approver is able to see all the contents entered by the user including the attachment but is not able to view/download this attahment. It's just not happening!!! :-( 

    I can write a code where, on pressing a button, I just build the attached file and then save it on a desired location, but I dont want to take this approach; because I may have multiple attachments in my template sometime later. Is there no way I can just click/right click on this attachment and download it wherever i want?

     Any inputs will be greatly appreciated.

    Thanks

    Deep...

  • 03-29-2010 01:45 AM In reply to

    Re: Attachments in Infopath disabled

    Hi Deep and welcome,

    Seems like the control is read-only. You should check that.

     

     

    Patrick Halstead
    Project Manager at Qdabra
  • 10-20-2011 09:04 AM In reply to

    Re: Attachments in Infopath disabled

    I am having the same issue as above. This attachment control has all of the default settings, I literally dragged it onto the page and gave it a name. No conditional formatting. Definitely not read only. The form has no extra views, just the default view. This view is not read only. When the user submits the form, permissions change on the SPListItem in the workflow. When it comes out the other side, this file attachment is disabled for all users regardless of their rights. Everything else about the form and workflow behave properly, just the attachment control no longer works. I have also attempted to re-set the permissions on this list item to various different permission sets (EG: inherit from the list, give myself full control) no difference no matter what permission set I try WTF
  • 10-20-2011 10:06 AM In reply to

    Re: Attachments in Infopath disabled

    OK I found the solution, this will apply to infopath 2010 as well. When I was serializing the form back to the SPListItem I forgot an XML processing instruction that apparently you need to have when the form has file attachments. (http://msdn.microsoft.com/en-us/library/dd907310(v=office.12).aspx) the code is (drum roll...) XmlProcessingInstruction piNew3 = docNewXml.CreateProcessingInstruction("mso-infoPath-file-attachment-present", string.Empty);
  • 10-20-2011 10:11 AM In reply to

    Re: Attachments in Infopath disabled

    Oh, nice stuff... Thanks so much for sharing this, I'm sure others have run into it as well.

    Hilary Stoupa

Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.