Send Email Code - InfoPath Dev
in

InfoPath Dev

Send Email Code

Last post 06-19-2007 12:08 AM by chang. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 06-12-2007 09:31 AM

    Send Email Code

    I have got the code referenced at the bottom of my post to work successfully provided I block out the reference to the xml title(//oEnvelope.Subject = getNodeValue(xmlTitle); ).  My issue resides specifically with this code: 

    var xmlTitle = XDocument.DOM.selectingSingleNode ("../dfs:dataFields/d:Tbl_Main/@Issue");

    Can anyone tell me why I keep getting the error message. "A run-time error has occurred.  Object doesn't support this property or method."  I know for a fact that the path is correct.  I have seen this code used else where, but for whatever reasons I just cant get it to refer to this or any other fields within my table.  I have experimented with hard coding the value and I know it then works.  But of course I need it to refer to a specific field to reduce redundancy.  I commented out the reference to xmlTitle to get it to work.  Your thoughts are welcomed.  Thank you.

     

    function SendEmailBtn::OnClick(eventObj)

    { createEmail(); }

    function createEmail()

    { var rgRecipients = new Array();

    var oEnvelope = XDocument.View.Window.MailEnvelope;

    //var xmlTitle = XDocument.DOM.selectingSingleNode ("../dfs:dataFields/d:Tbl_Main/@Issue");

    oEnvelope.To = rgRecipients.join("; ");

    oEnvelope.Subject = getNodeValue(xmlTitle);

    //oEnvelope.Subject = getNodeValue(xmlTitle);

    oEnvelope.Visible = true; }

     

     

  • 06-13-2007 12:57 AM In reply to

    • chang
    • Not Ranked
    • Joined on 03-28-2007
    • Posts 23
    The path might be correct, but the method name is not. Use XDocument.DOM.selectSingleNode instead of XDocument.DOM.selectingSingleNode.
  • 06-13-2007 06:44 AM In reply to

    Thank you I will give it a try.
  • 06-13-2007 06:48 AM In reply to

    Making the correction to the spelling still gives me the same error.  Any thoughts?
  • 06-19-2007 12:08 AM In reply to

    • chang
    • Not Ranked
    • Joined on 03-28-2007
    • Posts 23
    The only thing I can think of is the XPath expression, but you already said that you were 100% sure that it was/is correct.
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.