Clearing the cache and hiding the infopath screens - InfoPath Dev
in

InfoPath Dev

Clearing the cache and hiding the infopath screens

Last post 03-09-2013 06:37 PM by Patrick Halstead. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 03-07-2013 04:37 PM

    Clearing the cache and hiding the infopath screens

    We are having aa probblem with forms using older versions of the forms that are stored in cache.

    The only way we have found to fix the problem is to clear the cache.. the infopath versioning sometimes works, sometimes not .. depending on the level of operasting system used. XP, XP pro, Win  7 .. 

    We store our fom templates in sharpoint libraries and open them using a link to a loadform.

    The loadform uses the call  

    var FormLibraryName = "FormLib_Accountsetup";
        var strParentURL = "http://xxxx/";

        var strTemplate = strParentURL  + FormLibraryName  + "/Forms/template.xsn";
        var strSaveLocation = strParentURL  + FormLibraryName
        var strProgID = "SharePoint.OpenXMLDocuments";
        var strReLcation = strParentURL  + "_layouts/FormServer.aspx?XsnLocation=" + strTemplate;

     createNewDocumentWithRedirect(strTemplate, strSaveLocation , strProgID, true, strReLcation, 0);     

     to open the form that its pointing at.   I can add the call

    var sh=new ActiveXObject("Wscript.Shell");   sh.run("infopath /cache clearall")
    before it actually does the call to open the form to clear the caache but it opens the infopath screens.

    Is there a way to use this call to clear the cache, but not bring those screens up ?

  • 03-09-2013 12:39 PM In reply to

    Re: Clearing the cache and hiding the infopath screens

    Hi Ron,

    We have seen the cache issue before, but it's just not that fequent. I'm surprised that you are seeing it every time.

    The /cache clearall approach is a big stick. You could just delete the files from the InfoPath cache in the users AppData folder. Might be easier to do that. Certainly, that would avoid the screens popping up, but I haven't tested it. The registry would still point to the cache but hopefully it would reload since the cache is gone. If not, I'm sure you could ferret out the registry locations and clear those as well. Wouldn't require launching IP.

    Good luck!

    Patrick Halstead
    Project Manager at Qdabra
  • 03-09-2013 02:41 PM In reply to

    Re: Clearing the cache and hiding the infopath screens

     Yes, we thought of doing the delete .. but I hate to put in a hard coded delete command.

    Could end up deleting something not intended to delete.

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

    Re: Clearing the cache and hiding the infopath screens

    I'm guessing the registry would have information somewhere that would tell you which ones to delete so you could be more surgical. Might be some work.

    More importantly, why isn't the cache working?

    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.