onsubmit event handler did not work - InfoPath Dev
in

InfoPath Dev

onsubmit event handler did not work

Last post 07-14-2011 11:45 AM by Shyam23. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 07-14-2011 11:45 AM

    • Shyam23
    • Not Ranked
      Male
    • Joined on 06-10-2011
    • Atlanta
    • Posts 19

    onsubmit event handler did not work

    Hi,

    I have published several infopath forms as content types and saved the workspace as a template. Users will create many workspaces based on my template. I need the url of the workspace when the form is opening. If I use, substring-before(substring-after(processing-instruction()[local-name(.) = "mso-infoPathSolution"], 'href="'), '"'), it gives me the url of the content type. I used the code as per this blog: http://blogs.msdn.com/b/infopath/archive/2006/11/08/submitting-to-this-document-library.aspx?PageIndex=10&CommentPosted=true#commentmessage. Now I get an error.

    "Infopath cannot submit the form The onsubmit event handler did not work

    The given key was not present in the dictionary.
       at System.ThrowHelper.ThrowKeyNotFoundException()
       at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
       at Microsoft.Office.InfoPath.Internal.DataConnectionsHost.get_Item(String name)
       at Stakeholder_checklist_final.aspx.FormCode.FormEvents_Submit(Object sender, SubmitEventArgs e)
       at Microsoft.Office.InfoPath.Internal.FormEventsHost.OnSubmit(DocReturnEvent pEvent)
       at Microsoft.Office.Interop.InfoPath.SemiTrust._XDocumentEventSink2_SinkHelper.OnSubmitRequest(DocReturnEvent pEvent) "

    I have security as "full trust" only, but still I get this error. Can anyone guide where I am going wrong ?

    Thanks,

    Shyam

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