typed value displayed in email subject - InfoPath Dev
in

InfoPath Dev

typed value displayed in email subject

Last post 03-20-2006 09:57 PM by uma. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 03-20-2006 06:35 AM

    typed value displayed in email subject

    I am fairly new to infopath and programming and I'm having trouble writing a script that will allow me to display a typed value from a text box in the subject line of an email. I am writing the script in jscript. Any thoughts? Thanks.
  • 03-20-2006 09:57 PM In reply to

    • uma
    • Top 500 Contributor
    • Joined on 12-23-2005
    • Posts 35

    Re: typed value displayed in email subject

    Hi,

    Here is the code which you want in script:

    var oEmail = XDocument.DataAdapters("Email Submit");
    oEmail.To = [email protected];
    oEmail.CC = [email protected];
    oEmail.Subject = XDocument.DOM.selectSingleNode("xpath of the text box which you want to use");
    oEmail.Intro = "Email body";
    oEmail.Submit();

    In the above code "Email Submit" is the data connection which is used to submit the emails.
    You can create this in InfoPath form from Tools->Dataconnections.
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.