• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Dynamic Subject line won't allow submit button to work.

New Here ,
Aug 22, 2018 Aug 22, 2018

Copy link to clipboard

Copied

This is my script...I can't figure out what I'm missing.  When I click submit it doesn't do anything.  I'm trying to create a dynamic subject line with text in the body to click submit and the form to email as an attachment.

var CID = getField("CID").valueAsString;

var ORG = getField("ORG").valueAsString;

var ClientName = getField("ClientName").valueAsString;

var Requestor = getField("Requestor").valueAsString;

this.mailDoc({CTo:"email@email.com", cSubject: "Billing Adjustment for: CID "+CID+" - Org "+ORG+" - "+ClientName+" - "+Requestor, cMsg: "Please see the attached adjustment for "+ClientName+"."});

Any help is greatly appreciated.

TOPICS
Acrobat SDK and JavaScript , Windows

Views

339

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Aug 22, 2018 Aug 22, 2018

Make sure that the field name you're using in the code matches the actual field name exactly. That error is saying that a field with that name does not exist.

Votes

Translate

Translate
Community Expert ,
Aug 22, 2018 Aug 22, 2018

Copy link to clipboard

Copied

Press Ctrl+J and check if there are any error messages after you click the button.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 22, 2018 Aug 22, 2018

Copy link to clipboard

Copied

It's tell me my ClientName field is null, however you can see I have text in the field

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 22, 2018 Aug 22, 2018

Copy link to clipboard

Copied

Make sure that the field name you're using in the code matches the actual field name exactly. That error is saying that a field with that name does not exist.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 22, 2018 Aug 22, 2018

Copy link to clipboard

Copied

LATEST

awesome thank you!!  They looked the same, but I retyped them and then they worked.  I appreciate it.  Now to figure out how to get it to not bypass my required fields.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 22, 2018 Aug 22, 2018

Copy link to clipboard

Copied

Change CTo to cTo.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 22, 2018 Aug 22, 2018

Copy link to clipboard

Copied

corrected that, thanks still doesn't work.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines