Save offline then submit to SharePoint? - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Save offline then submit to SharePoint?

Last post 12-22-2009 04:58 AM by Irianna. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 12-14-2009 01:51 AM

    Save offline then submit to SharePoint?

    Hello folks,

    I've got a form currently set up which i need to let users fill in offline, where multipul users will fill in the form numerus times, and then when the laptop is put back online it submits the data of the forms to a SharePoint list.

    I've created the form, but i'm a little stuck on getting it to submit offline and then submit to SharePoint after.

    Any help would be greatly appreciated.

    Many thanks in advance,

    Iri

     

    -------
  • 12-14-2009 05:56 AM In reply to

    Re: Save offline then submit to SharePoint?

    The only thing I can think of is doing an email solution, which gets later uploaded to SharePoint. For details, read this.

    Otherwise, just have users go to File > Save when they are offline, and have a SUBMIT button for when they are online.

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 12-16-2009 02:53 AM In reply to

    Re: Save offline then submit to SharePoint?

    Thanks for your reply.

    email is a great idea, unfortunatly with the ammount of forms that im expecting i need an automatic way of submission to the document library

    -------
  • 12-16-2009 10:55 PM In reply to

    Re: Save offline then submit to SharePoint?

    there is no out of box solution for this. but you can definetly create an extra utility for this. the utility needs to be TSR type (terminate and stay resident) if you want no manual interaction with it.

    when a user tries to submit the form and he is offline. create an entry (file location) in some file.

    when user comes online, your TSR program, will execute and get entries from the file, and user interop open the file and submit it.

    Qazi Anis
    Technical Architect
    Bitwise Inc
  • 12-17-2009 02:44 AM In reply to

    Re: Save offline then submit to SharePoint?

    Sounds just like what i need.

    Never done one of those before, got any help / guidance you can offer?

    Thanks, Iri

    -------
  • 12-22-2009 02:44 AM In reply to

    Re: Save offline then submit to SharePoint?

    Hi,

    I've found some code online that will do what i need with a submit, but its in InfoPath 2003, and Im using 2007.

    when I put the code in, its errors saying that  DocReturnEvent namespace couldnt be found.

    Is anyone able to help?

    The link to where I found this is here: http://blogs.msdn.com/infopath/archive/2004/03/17/91313.aspx 

    The code is:

    public void OnSubmitRequest(DocReturnEvent e)

            {



                if (thisApplication.MachineOnlineState == XdMachineOnlineState.Online)

                {

                    // submit to Sharepoint using DAVAdapter

                    (thisXDocument.DataAdapters["Submit to Sharepoint"] as DAVAdapter).Submit();

                }

                else

                {

                    // We are offline or working offline.

                    XmlDocument oDOM = new XmlDocument();

                    Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMDocument oWrappedDOM = thisXDocument.DOM;



                    oDOM.PreserveWhitespace = true;

                    oDOM.LoadXml(oWrappedDOM.xml);

                    oDOM.Save("C:\\Submit\\Form_"

                           + DateTime.Now.ToString("yyyy.MM.dd_HH.mm.ss.ff") + ".xml");

                }



                e.ReturnStatus = true;

            }

     

     

     

    Thanks in Advance,

    Iri

    -------
  • 12-22-2009 03:57 AM In reply to

    Re: Save offline then submit to SharePoint?

     That code is for InfoPath 2003.  You can use it in InfoPath 2007 but you need to configure your form to use 2003 C# code in Form Options.  You should also add the event handler by using the Submit Options dialog.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 12-22-2009 04:58 AM In reply to

    Re: Save offline then submit to SharePoint?

    Thanks alot thats worked a treat,

    Now there is a problem with Digital Sigs and Trusted forms as it wants to edit files on the local PC

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