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

acrobat signature preventing app.mailMsg() from executing

New Here ,
Oct 17, 2017 Oct 17, 2017

Copy link to clipboard

Copied

I have a PDF form that has a submit button that sends a notification email using the javascript app.mailMsg() function. I need to use app.mailMsg() as the form is auto-saved to a company server as it's filled out and I just need to send a notification email using one of the form variables (the doc. number). I do not need to send the form.

The form also uses a digital signature field to track who in the company is submitting forms. My problem is, if someone signs the document, the app.mailMsg() call ceases to work and generates the following error:

NotAllowedError: Security settings prevent access to this property or method. Doc.subject:2:Field SUBMIT:Mouse Up

I've managed to track the problem to the digital signature. At any point, before signing the document, if the submit button is clicked, it generates the appropriate email. Once the document is signed, security measures prevent the submit button from working. Is there a way to fix/workaround this issue?

TOPICS
Acrobat SDK and JavaScript

Views

579

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

Community Expert , Oct 17, 2017 Oct 17, 2017

My guess is they've created a variable called "subject", which is conflicting with the internal property of the Document object with that name, so moving the code won't solve it. Renaming the variable to something else will.

Votes

Translate

Translate
Community Expert ,
Oct 17, 2017 Oct 17, 2017

Copy link to clipboard

Copied

Can you post your code?

On Tue, Oct 17, 2017 at 8:46 PM, scottp51589877 <forums_noreply@adobe.com>

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
Community Expert ,
Oct 17, 2017 Oct 17, 2017

Copy link to clipboard

Copied

You can move your code from the submit button to the Signature field so that it executes when the document gets signed.

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
Community Expert ,
Oct 17, 2017 Oct 17, 2017

Copy link to clipboard

Copied

My guess is they've created a variable called "subject", which is conflicting with the internal property of the Document object with that name, so moving the code won't solve it. Renaming the variable to something else will.

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 ,
Oct 17, 2017 Oct 17, 2017

Copy link to clipboard

Copied

thanks try67! renamed the subject variable and it's working great!

Too bad I just found out the method isn't supported in reader which is what 90% of our employees will use...

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
Community Expert ,
Oct 17, 2017 Oct 17, 2017

Copy link to clipboard

Copied

Yes, that's correct. That's why it's important to carefully read the documentation of the methods and properties you use in your code, to make sure they will work in all circumstances the file is going to be used.

You can change it to mailDoc, though. It offers the same functionality, only then the file itself will be attached to the email.

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
Community Expert ,
Oct 17, 2017 Oct 17, 2017

Copy link to clipboard

Copied

LATEST

I’d never have caught that.

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