Hi, Please see below and let me know if I am missing something as it is not working. everything works, but I'm trying to get javascript to pull the field "MTRF Number" from the PDF and add that into the body of the text, however, when I activate that script, the body of the email just ends with "This is your Order number:" //submit button this.mailDoc({cTo: orderfulfillmenthub@email.ca, cSubject: this.getField("Province Dropdown").valueAsString + " - " + this.getField("Site Name").valueAsString + " - " + this.getField("DATE REQUESTED").valueAsString + " - " + this.getField("MTRF Number").valueAsString, cMsg: "Thank you for submitting your request to the Order Fulfillment Hub.\n" + "\n\nPlease allow three to five days for orders to arrive on site. Your order number is:"}); (this.getField("MTRF Number").valueAsString); Code (markup):
Adding some formatting I think points out the problem. this.mailDoc({ cTo : orderfulfillmenthub@email.ca, cSubject : this.getField("Province Dropdown").valueAsString + " - " + this.getField("Site Name").valueAsString + " - " + this.getField("DATE REQUESTED").valueAsString + " - " + this.getField("MTRF Number").valueAsString, cMsg: "Thank you for submitting your request to the Order Fulfillment Hub.\n\n\n\Please allow three to five days for orders to arrive on site. Your order number is:" }); (this.getField("MTRF Number").valueAsString); Code (markup): Can you see it? Your cTo lacks quotes for the string, and the getField for the string is AFTER the mailDoc's object instead of added inside it. Did you mean: this.mailDoc({ cTo : "orderfulfillmenthub@email.ca", cSubject : this.getField("Province Dropdown").valueAsString + " - " + this.getField("Site Name").valueAsString + " - " + this.getField("DATE REQUESTED").valueAsString + " - " + this.getField("MTRF Number").valueAsString, cMsg: "Thank you for submitting your request to the Order Fulfillment Hub.\n\n\n\Please allow three to five days for orders to arrive on site. Your order number is:" + this.getField("MTRF Number").valueAsString }); Code (markup): This is why professionals don't slop everything onto one line. Format your code, it can save you SO many headaches because it makes such fumbles a lot clearer. "There are two methods in software design. One is to make the program so simple, there are obviously no errors. The other is to make it so complicated, there are no obvious errors." -- Tony Hoare I consider formatting to be part of that simplicity.