<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: How call two connections data after send form?</title><link>https://www.infopathdev.com:443/forums/thread/2012.aspx</link><pubDate>Wed, 05 Apr 2006 02:02:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:2012</guid><dc:creator>Shiraz Cupala</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/2012.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=2012</wfw:commentRss><description>You could also use rules for this if you like.  This is described in:&lt;br /&lt;a target="_blank" href=http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=1956&gt;http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=1956&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It's not obvious, but using rules on a button you can submit to two data connections at the same time (two separate rule actions) without having to write code.</description></item><item><title>Re: How call two connections data after send form?</title><link>https://www.infopathdev.com:443/forums/thread/2011.aspx</link><pubDate>Sun, 19 Mar 2006 01:35:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:2011</guid><dc:creator>Stephanie Cantwell</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/2011.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=2011</wfw:commentRss><description>Hello,&lt;br /&gt;&lt;br /&gt;please check this MSDN article&lt;br /&lt;a target="_blank" href=http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_ip2003_ta/html/odc_InfoPath_submitting_forms.asp&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_ip2003_ta/html/odc_InfoPath_submitting_forms.asp&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Check the code inside OnSubmitRequest.  It's C# code, but it should give you idea how it is done.&lt;br /&gt;&lt;br /&gt;public void OnSubmitRequest(DocReturnEvent e)&lt;br /&gt;{&lt;br /&gt;    try&lt;br /&gt;    {&lt;br /&gt;        string reportType = thisXDocument.DOM.selectSingleNode("//my:reportType").text;&lt;br /&gt;        string submitDestination;&lt;br /&gt;        // Individual reports are e-mailed to the project manager.&lt;br /&gt;        if (reportType == "Individual")&lt;br /&gt;        {&lt;br /&gt;            EmailAdapter emailSubmit = (EmailAdapter)thisXDocument.DataAdapters["EmailSubmit"];&lt;br /&gt;            emailSubmit.Submit();&lt;br /&gt;            submitDestination = thisXDocument.DOM.selectSingleNode("//my:projectManager/my:emailLink").text;&lt;br /&gt;        }&lt;br /&gt;        // Summary reports are submitted to SharePoint.&lt;br /&gt;        else&lt;br /&gt;        {&lt;br /&gt;            DAVAdapter sharepointSubmit = (DAVAdapter)thisXDocument.DataAdapters["SharePointSubmit"];&lt;br /&gt;            sharepointSubmit.Submit();&lt;br /&gt;            submitDestination = sharepointSubmit.FolderURL;&lt;br /&gt;        }&lt;br /&gt;        thisXDocument.UI.Alert("The form has been successfully submitted to " + submitDestination + ".");&lt;br /&gt;        e.ReturnStatus = true;&lt;br /&gt;    }&lt;br /&gt;    catch (System.Exception ex)&lt;br /&gt;    {&lt;br /&gt;        thisXDocument.UI.Alert("Could not submit " + ex.Message);&lt;br /&gt;        e.ReturnStatus = false;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;</description></item><item><title>How call two connections data after send form?</title><link>https://www.infopathdev.com:443/forums/thread/1193.aspx</link><pubDate>Mon, 13 Mar 2006 13:26:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:1193</guid><dc:creator>luccena</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/1193.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=1193</wfw:commentRss><description>Friends, I do not know to program and necessary of aid. &lt;br /&gt;How I write a code for after to press the button "to send" to call two connections data "sendSharepoint" and "sendEMail" ???&lt;br /&gt;&lt;br /&gt;I am using in "script.js" the stretch of codígo below:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function XDocument::OnSaveRequest(eventObj)&lt;br /&gt;{&lt;br /&gt;	//It writes the code to be executed before saving here. &lt;br /&gt;&lt;br /&gt;	eventObj.IsCancelled = eventObj.PerformSaveOperation();&lt;br /&gt;&lt;br /&gt;	//It writes the code to be executed after saving here.&lt;br /&gt;&lt;br /&gt;	eventObj.ReturnStatus = true;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Necessary that when sending the form, it executes the two data connections that already I prepared (sendSharePoint and sendEmail). &lt;br /&gt;&lt;br /&gt;Thanks!!!&lt;br /&gt;Leandro Lucena - Brazil.</description></item></channel></rss>