Total Pageviews

Friday, 2 August 2013

Livecycle Designer: Email Subject from Text Field

Problem:
Email Subject from Text Field.

Solution:
  1. You need a regular button that calls this script when clicked.  You cannot use built-in Email Submit Button
  2. Use can use this script for getting Subject from Text Field

topmostSubform.Page1.Button1::click - (JavaScript, client)

var subject ="Invoice number: " + txtInvoiceNumber.rawValue;

var myDoc = event.target;
try {
    myDoc.mailDoc({
        bUI: false,
        cTo: 'mah@test.ac.uk', // Replace with actual receiver mail address.
        cSubject: subject,
        cSubmitAs: "PDF"
    });
} catch (e) {
    // exception handling...
}


No comments:

Post a Comment