Skip to main content
borin_southernr24415334
Participating Frequently
July 2, 2018
Answered

JavaScript Button in PDF to attach form in draft email.

  • July 2, 2018
  • 1 reply
  • 2143 views

I have the following code but it is not creating a draft when you click on it. What is wrong?

var subject= getField("Part Number").value + (" \ ") + getField("Material Number").value + getField("Priority").value

this.mailDoc({

cTo: "email1@email.com",

cCC: "Email@email.com",

cSubject: subject,

cMsg: "This is a DORF Request please provide a response in a timely fashion."

});

This topic has been closed for replies.
Correct answer try67

for some reason it is not reading the getField


I'll need to see the file itself to be able to help you further.

You can share it via Dropbox, Google Drive, etc., or if you want you can send it to me via email (try6767 at gmail.com).

1 reply

try67
Community Expert
Community Expert
July 2, 2018

Change the name of the "subject" variable to something else, like

"mySubject". "subject" is one of the document's built-in properties, so you

might be accidentally trying to write to it.

On 2 July 2018 at 17:00, borin southernr24415334 <forums_noreply@adobe.com>

borin_southernr24415334
Participating Frequently
July 2, 2018

This is what it looks like but It is now leaving subject line blank.

var Mysubject= getField("Part Number").value + (" \ ") + getField("Material Number").value + getField("Priority").value

this.mailDoc({

cTo: "email1@email.com",

cCC: "Email@email.com",

cSubject: Mysubject,

cMsg: "This is a DORF Request please provide a response in a timely fashion."

});

try67
Community Expert
Community Expert
July 2, 2018

Are there any error messages in the JS Console?