Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Javascript help

Community Beginner ,
Jun 20, 2021 Jun 20, 2021

Copy link to clipboard

Copied

var cToAddr = this.getField("LMEmail").value;


var cCCAddr = this.getField("Submitters Email").value;


var cSubLine = this.getField("Date Signed").value+"_"+this.getField("ContactName").value+"_"+this.getField("UnitRef").value+"_"+this.getField("StartDate").value;
var cBody = "Thank you for submitting your FMT1000.\n" + "If you require a copy of the form please save the attachment for your own records"


this.mailDoc({bUI: true, cTo: cToAddr, cCc: cCCAddr, cSubject: cSubLine, cMsg: cBody});

Hope someone can help I am using this javascript above but I getting (GeneralError: Operation failed.
Doc.mailDoc:15:AcroForm:Submit to Line Manager:Annot1:MouseUp:Action1) 

 

I have checked the code and can't find anything wrong with it. But I've only just started to learn Javascript in the past two weeks so could of made a mistake.

 

Really hope someone can point where I have gone wrong and hope I can make it right.

 

I have also attached the document I trying to get working.

TOPICS
Comment review and collaborate PDF, Create PDFs, General troubleshooting, How to, JavaScript, PDF forms

Views

282

Likes

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
Adobe Community Professional ,
Jun 20, 2021 Jun 20, 2021

Copy link to clipboard

Copied

Works fine here. However, when no email address is selected it uses "Select" as the target email address, which is of course incorrect. You should set that field as required.

Likes

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
Community Beginner ,
Jun 22, 2021 Jun 22, 2021

Copy link to clipboard

Copied

Thank you for having a look at this but it just doesn't work for me. I have downloaded the file that I uploaded and still, it doesn't work for me. Do you know why this could be happening to me?

Likes

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
Adobe Community Professional ,
Jun 22, 2021 Jun 22, 2021

Copy link to clipboard

Copied

LATEST

Where are you opening it, exactly? In what application? And are you selecting a value other than the default one under LMEmail?

Likes

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