Need help with Javascript automated e-mail

I am trying to modify a form to add a button that takes the values of the fields that will be filled in by the user and then send an email using these fields

currently I have the following script:

var A = xfa.resolveNode("topmostSubform.Page1.Work_Order__").rawValue;
var B = xfa.resolveNode("topmostSubform.Page1.NOMENCLATURE").rawValue;
var PPC = xfa.resolveNode("topmostSubform.Page2.Email_Address_PPC").rawValue;
void var = 'work created order. "
var msgBody = "Order of work" + A + "\n for the" B + "program has been created"; "."
app.mailMsg ({}
bUI: false,
cTo: PPC,.
bassujetti: void.
CMSG: msgBody,
});

Thanks for your help,

John

Hi John,.

Your script looks not too bad. Here is our generic script:

var vEmail = "[email protected]";
var vSubject = "A Subject for your email";
var vBody =  "Put your body message here...";

event.target.app.mailMsg({
     bUI: true,
     cTo: vEmail,
     cSubject: vSubject,
     cMsg: vBody
});

Try putting "event.target." before the app.mailMsg. Also you need not of the xfa.resolveNode, if the items, pages, and the subofrms are appointed.

Hope that helps,

Niall

Tags: Adobe LiveCycle

Similar Questions

  • Need help with Javascript for Acrobat 9 Pro

    Hello

    I have created a PDF form in Adobe Acrobat 9 of Profession.  Not having not much experience with Javascript, I found this forum very helpful and have many examples of script used to other issues, I had.  I was hoping that someone could help me with the following script, I tried many variations, cannot operate.

    var ratio = this.getField("ratio").value
    concentration of var = this.getField("concentration").value
    var result = this.getField("result").value
    If (ratio.value > = 50.00)
    {result.value = 'PASS' ;}
    If (ratio.value".value > = 40.00)
    {result.value = 'PASS' ;}
    If ((concentration.value ==61) & & (ratio.value > = 49,25))
    {result.value = 'PASS' ;}
    If ((concentration.value ==61) & & (ratio.value > = 39.25))
    {result.value = 'PASS' ;}
    If ((concentration.value ==62) & & (ratio.value > = 48.50))
    {result.value = 'PASS' ;}
    If ((concentration.value ==62) & & (ratio.value > = 38.50))
    {result.value = 'PASS' ;}
    on the other
    {result.value = "FAIL" ;}

    It's just a piece of code, concentration values run from 61 to 99 and the value of the ratio varies for each value of the concentration, there is a high ratio and a low ratio.  The result of this field to complete the field of results with a SUCCESS or a FAILURE.  This isn't working... any help is greatly appreciated!

    If this script is attached to the Calculate of the "result" field event, if I understand correctly the logicm code should be something like:

    // Get a reference to the ratio field
    var ratio = this.getField("ratio");
    
    // Get a reference to the concentration field
    var concentration = this.getField("concentration"); 
    
    // Default
    var res = "FAIL";
    
    if (ratio.value >= 40.00) {
        res = 'PASS';
    }
    
    if ((concentration.value == 61) && (ratio.value >= 39.25)) {
        res = 'PASS';
    }
    
    if ((concentration.value == 62) && (ratio.value >= 38.50)) {
        res ='PASS';
    }
    
    // Set this field's value
    event.value = res;
    

    If the code is placed elsewhere, you must indicate the location.

  • need help with a new e-mail address

    I have a yahoo address & hotmail.  I need an e-mail address not in use to register with a dating service.  How can I do this?

    Sign up for another yahoo or hotmail address... DUH.

  • Need help with MWI for voice mail on SIP with SPA9000

    I can't get my MWI to work with my answering machine SIP.  I have:

    SPA9000

    1 SPA962

    1 SPA941

    My ITSP is Mconnect and my SIP phone number is configured for line 1 on the SPA9000.

    I am using their voicemail.  I want the MWI light only on my phone SPA962.  I packed an id 1101 for this phone's mailbox.  I can press the message button and connect to my voicemail, but I don't get a MWI when I have new voicemail.

    Here are the settings for voicemail, I SPA9000 > voice > line 1:

    Mailbox repository URL: mysiptelephonenumber@line1proxy

    URL for mailbox management: even the form of mailbox repository URL

    Mailbox subscribe URL: it is indifferent to what I put in this context, nothing works.

    MConnect gave me a few things to try, but they do not work either.

    Any help is greatly appreciated.

    Marti

    I googled my question and found the answer here on this forum in a post from last year!  My MWI now works as it should when I have voice mail on my SIP line.

    Here is the link to the post on this forum where I found the answer:

    http://forums.linksysbycisco.com/Linksys/board/message?board.ID=VoIP_Phones&thread.ID=3899

    Also be sure to enter the URL for the mailbox to subscribe, filing and management.

    Mine are my number of mailbox @ the proxy for the line that my SIP line is activated, which is Line 1

    Marti

  • Need help with the automation of the file please help

    My source is peoplesoft and backend is the oracle database and target is .csv file, I have a requirement in which I need to implement file transfer in odi every moment dat is updated, it would change as when all data from jan are added in the file would be of PPLsoft as JAN_2014.csv and that all of the data are added for Feb it would add all data to Jan and also FEB and would be FEB_2014.csv file. IS this possible, if possible how we can do

    Help is greatly appreciated

    Create a variable of refreshment REFRESH_VAR with query below.

    Select TO_CHAR (ADD_MONTHS (SYSDATE-1), "MON_YYYY") of the double

    Then drag this variable in the package and set it as step 1. Then, drag the interface (table to file). Save the package.

    Now open the file data store which was used as a target and higher of the interface.

    In the resource name field, change it to something like below.

    PREFIX_FILE_NAME #REFRESH_VAR.txt

    Save and run the interface. You should now see the file with the month and year as the file name suffix.

    Chantal

  • I need help with fusion and direct mail with attachment PDF!

    I am trying to send more than 400 emails via the mail with an attachments in PDF to Word 2013. My earlier version of Word had the MERGE feature in PDF format and when I upgraded to the word 2013, he disappeared. Can someone help me? Is it an add-on I'm supposed to be? Thanks a bunch!

    Taushadoll

    Yes, or you can downgrade (Acrobat or office)...

  • Need help with JavaScript button to save as an event.

    Hello

    I use Adobe Acrobat X Pro and am totally new to scripting of forms in Adobe (completely new to Adobe Acrobat as well!).  There is a backup on a form button that opens the Save dialog box under using a trigger (the mouse upward) and action (execute a menu item - file > save under... > PDF...) and it works fine, however, I want to now use javascript to change the behavior of the button so that it uses a trigger (the mouse upward) and action (run a JavaScript script) , and I want that JavaScript to combine the text values in two form fields (a location drop down and a date text field) and use this string concateneated + ".pdf" as the file name when he opens the Save as dialog box.  Make sense?

    This is what I added to the button as a JavaScript so far I use a test at this time string ("NewFile.pdf") and add the string that is concatenated to the script after that I know that the script works as it should.

    var NouveauNomFichier = "NewFile.pdf";

    var pathArray = this.path.split("/"); "

    pathArray.pop ();

    pathArray.push (newFileName);

    this.saveAs(pathArray.join("/")); "

    Up to present two questions:

    1. when I click the button nothing happens, no dialog Save as or whatever it is.

    2 when I check the properties of the button depending on the Actions tab shows property to select Action "Performing a menu item", even if I chose previously 'run a JavaScript '.

    Thanks for any help!

    The saveAs method will not work if the code is placed in a key event. It would need to be in a JavaScript file to the folder level, inside a function of confidence, inside a block of app.beginPriv/app.endPriv. Each user must have the JavaScript file to the folder level. The button can then call the code in the file. It will be possible for users of the form?

  • BlackBerry Q10 need help with settings for e-mail account on Q10.

    I used to have Bold9900 and possible to set different "Username" and "E-mail".

    Both will be in the form of e-mail, so recipients will see my name of the sender as the enamel on the 'User name' field and cannot see my real mail. (Provided by loxinfo @cscoms.com)

    However, once that the device was introduced to the new Q10. It is more possible to do.

    I have to use the same information on both fields.

    Is there anyway that I can check the parameters of Q10?

    Note: It is always also work the same way as Bold9900 on the iPad.

    Hello and welcome to the community!

    I don't know, from your description, exactly what you're looking for. "Username" and "E-mail"? You may be looking for the ability to enter a 'reply-to' e-mail address which is different from the actual email address of the account you are sending from? If so, this feature is indeed not currently available in BB10. Among other features, this is perhaps one that many hope are added to the BB10 platform with future versions of the operating system. But for now, it is what it is.

    Good luck!

  • Need help with JavaScript web application form.  Need to limit the pixels and the size of the image

    I build several forms for www.iswapusa.com and on the site, visitors are asked to upload images, I want to restrict the width in pixels max 400 pixels and size to maybe 1 MB to 3 MB of the file images if possible.  If there is a code to do this, please let me know and where do I put it on business catalyst system. to work with forms I create or even if I have to give to each form.  The forms are available from one of these pages offer commercial or Non-commercial offer.

    I found the answer to my problem.  It is not a java solution, but a simple code.  You can create in your retail or list view depending on where you want the images appear of your form will be mailed.  the answer was in a previous post, and the link is:

    Dynamically generating thumbnail images

    The code I used was:

           

           

           

  • Need help with javascript...

    I have a form that I want to send. When it creates the email, I have a script which inputs e-mail sender, a subject line that between the body of the text, including the name of the employee as well as the date and the name of the person completing the form from the "empName" field specified in the field 'weekend '. I want to add the totals for each line (regular, vacation and sick). For some reason, the script stops when I try to add row grand totals. When it works, here is my script:

    var oDoc = event.target;
    
    oDoc.mailDoc({
    bUI: true,
    cTo: "[email protected]",
    cCC: "[email protected]",
    cSubject: "Weekly Employee Time Summary for "+empName.rawValue,
    cMsg: "Attached is the Weekly Employee Time Summary for "+empName.rawValue +" for the week ending "+weekEnd.formattedValue
    });
     

    If I just add one line totals, the Send button does not work. Here is the code with the addition of a line total:

    var oDoc = event.target;
    
    oDoc.mailDoc({
    bUI: true,
    cTo: "[email protected]",
    cCC: "[email protected]",
    cSubject: "Weekly Employee Time Summary for "+empName.rawValue,
    cMsg: "Attached is the Weekly Employee Time Summary for "+empName.rawValue +" for the week ending "+weekEnd.formattedValue +". Vacation Total: "+vacTotal.rawValue
    });
     

    Any ideas why it's a failure? Attached is the file itself

    https://drive.Google.com/UC?export=download & ID = 0B3ZhSiIWrwvWUUhfa0hCZlJFX00

    You must write the path to the object, you cannot access the object if it is in the same subform or if it has a similar parent

    You should write this to access your total value inside the table

    Table1.vacation.vacTotal.RawValue

  • Need help with Javascript to get the value of standard report column

    Hi all

    Apex 3.1 version

    I have a query SQL (editable report) region where I need to do validations using a process of OnDemand and javascript. For this posting, I need to use the serial number and id of this same report line item. The function is called when the serial number is changed. I can get the serial number easily because it is a text field, however, the item id is a standard report column (which actually a text field or hidden gives me a checksum error, long story). How can I get the value of the standard report column to set the value of an element of the Application to use in my process of application as well as the serial number? Here is my code below.
    <script>
    
    function f_ValidateSerial(pThis)
    {
        
      // The row in the table
    
      var vRow = pThis.id.substr(pThis.id.indexOf('_')+1);
    
        //alert('Row is '+vRow);
    
    
      // Display the serial number
        //alert('The Serial Number is '+html_GetElement('f21_'+vRow).value);
    
      
     var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=ValidateSerial',0);
     get.add('F101_SERIAL_NUMBER',html_GetElement('f21_'+vRow).value);
     get.add('F101_INVENTORY_ITEM_ID',+html_GetElement(?????+vRow).value);   // Here's where I need to get the item id to set application item!!
     
     gReturn = get.get();
     
    if (gReturn)
        { 
          alert(gReturn);
        }
     
      if(gReturn)
        { 
          html_GetElement('f21_'+vRow).value = '';
        }
               
    }
    </script>

    Hello

    Ok

    Item ID is standard report column.
    If you enter this Expression HTML column

    #ITEM_ID#
    

    I guess that the substitution of column item Id is #ITEM_ID #.

    Now, you have hidden input form that is not submitted.
    Then in JavaScript

    get.add('F101_INVENTORY_ITEM_ID',+html_GetElement('item_id_'+Number(vRow)).value);
    

    Kind regards
    Jari

  • Need help with Javascript calculation hidden values.

    See the problem down below. Thank you.

    Calc_Problem.jpg

    This line is incorrect:

    (TotalValB - CostBasB) = this.getField("NV_B").value;

    Replace with:

    this.getField("NV_B").value = (TotalValB - CostBasB);

  • Need help with javascript used to check the data in the mandatory radio button fields

    required_fields

    I get a syntax error (SyntaxError: missing: after the id property 17; at line 18).  I am trying to run a script to verify data in all the fields required radio button before letting the user to submit the form (or save).  Here is the code I use:

    var AllRequiredFieldsSet = true;

    for (var i = 0; I < this.numFields;i++)//loop through all form fields)

    {

    var fldName = this.getNthFieldName;

    var currentFld = this.getField (fldName);

    if(currentFld.type=="radio")

    {

    All the radios that are needed to see if the user filled their

    if(currentFld.Value=="OFF")

    AllRequiredFieldsSet = false; one of the option boxes has not been selected, this form cannot be sent

    }

    }

    If (AllRequiredFieldsSet is false)

    App.Alert ("all the required areas have not been met");

    on the other

    this.submitForm ({cURL"mailto:EMAILADDRESS@gmail.com", cSubmitAs: "PDF"});

    Miss me not all media... Any ideas on what I'm missing?

    Thank you! Judy

    These two lines should fix things:

    var fldName = this.getNthFieldName (i);

    ...

    if(currentFld.type=="RadioButton")

  • Need help with JavaScript/region templates and APEX (Show Hide region)

    I have a page that I am building where I want to use a form of a page but the swap areas (without reloading the page). In my example form, I have 3 areas I want to talk about as general, Major, Standard. I have them where they will be show and hide but the result is not satisfactory, because even if the region is hidden, the white space remains there where he was. Basically I want the form to continuous flow when the effect is that Standard replaces the more important or Major replaces the standard when you change the menu drop down.

    Link to the example on apex.oracle.com: http://apex.oracle.com/pls/otn/f?p=23948:1
    Developer Access:
    workspace: dapullia
    username: guest
    password: demo
    The application number is 23948

    Hello David,.

    Instead of the "visibility" of switching you must pass the 'view' of the 'block' to 'none '.
    If your code should be something like this (using the notation of APEX javascript library)

    $x("MAJOR_EVENT").style.display = 'block ';
    $x("STD_EVENT").style.display = 'none ';

    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this response in marking it as useful or Correct ;-)

  • Need help with my Mail window. I can't export my message to the PST format. I keep getting the message error "an error occurred during initialization of MAPI".

    Hello

    Need help with my Mail window. I can't export my message to the PST format. I keep getting the message error "an error occurred during initialization of MAPI". Y at - it solution or another method?

    Hi ErikLee,

    Do you have MS Outlook installed on your computer?

    Windows mail import and export opportunities are limited to an Outlook .pst file or an Exchange Server mailbox. They are available only if MS Outlook is installed.
    If MS Outlook is not installed and you start an import or export action, the necessary support files are not present for Windows mail complete the operation. Then I suggest you to install Outlook temporarily and see if the problem is resolved.

    Follow the instructions below and check if the problem is resolved.

    1. reboot your computer, and then start Windows Mail.
    2. on the Tools menu, click Options.
    3. in the connection tab, click on edit to open the Internet Properties dialog box.
    4. in the tab programs, click on an application other than Windows mail e-mail in the e-mail list. Click on apply and then click OK.
    5. click OK again to close the Options dialog box.
    6. exit Windows mail and restart Windows mail.

    If this does not work, I suggest you upgrade to Windows Live Mail to import or export messages that may help you resolve the issue.

    To download Windows Live Mail, visit the following Microsoft Web site:
    http://get.live.com/wlmail/overview

    For more information about Windows Live Mail, see the Microsoft Web site at the following address:
    http://windowshelp.Microsoft.com/Windows/en-us/help/4b30d3d6-abe2-46d1-a5fd-4a1ba786a1381033.mspx

    Check whether the problem is resolved.

    Please post back and let us know if it helped to solve your problem.

    Kind regards
    KarthiK TP

Maybe you are looking for