Copy link to clipboard
Copied
I built a button on a form to email the entire .pdf back for review. I figured out how to program the button to execute a Java script that will pull data from a field and display it in the Subject line of the email.
var mySubject=this.getField("Traveler Name").value;
this.mailDoc({bUI: true, cTo: "corporate.security@mycompany.com", cSubject: mySubject})
What I can't seem to figure out is how to edit the script to include the text, "Business Essential Travel Request from: " to precede the [Traveler Name] field in the Subject line:
PS: I have NO Java KSA's.
In JavaScript, Text is concatonated just like numbers are added.
var mySubject= "Business Essential Travel Request from: " + this.getField("Traveler Name").value;
Copy link to clipboard
Copied
In JavaScript, Text is concatonated just like numbers are added.
var mySubject= "Business Essential Travel Request from: " + this.getField("Traveler Name").value;
Copy link to clipboard
Copied
var cSubLine = "Business Essential Travel Request for " + this.getField("Traveler Name") .value;
this.mailDoc({bUI: true, cTo: "corporate.security@mycompany.com", cSubject: cSubLine})
thoughts?
Copy link to clipboard
Copied
Do you have a question?
The code looks good.
Copy link to clipboard
Copied
No, sorry! No question- just wanted confirmation the code was sound. Thanks for your time!