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

Signature and Share point check in

Community Beginner ,
Feb 24, 2021 Feb 24, 2021

Copy link to clipboard

Copied

I have a pdf form that upon creation is uploaded to sharepoint in a document library.  After creation the document needs to be signed by a recipient.  Is it possible to automatically update document properties and check in the document on share point upon signature?

TOPICS
JavaScript , PDF forms , Security digital signatures and esignatures

Views

436

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 ,
Feb 25, 2021 Feb 25, 2021

Copy link to clipboard

Copied

Would you mind elaborating a little bit more on what do you mean by automatically updating the document properties  upon signing and reviewing it from the sharepoint library?

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 Beginner ,
Feb 25, 2021 Feb 25, 2021

Copy link to clipboard

Copied

The document is primarily used on a sharepoint document library.  When it is opened from the library, it checks out the document for editing.  At this point, someone will sign the document.  The next step is to update the sharepoint document properties  (column is titled Status with a drop down to select "Picked Up").  Checking in would actually occur when the pdf is closed).  I would like to automatically update the status column upon signature.

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 ,
Feb 25, 2021 Feb 25, 2021

Copy link to clipboard

Copied

 

If I understood correctly, you need the status column to reflect the change of status before the document is signed and after the document gets signed, correct?

 

If so, I don't think the use of a dropdown menu is necessary if all you want  is a textfield object  to just display "Picked Up" or "Not Picked Up" based on the status of the signature field.

 

For example, what works for me is to create a read-only text field and use a custom calculation script with a small line of code like this:

 

 

var sigField = this.getField("mySignatureField");

var sigStatus = sigField.signatureValidate();


if (sigField.valueAsString =="") {

event.value = "Picked Up";

} else {

if (sigStatus == 0) {

event.value = "Not Picked Up";

  }

}

 

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 Beginner ,
Feb 26, 2021 Feb 26, 2021

Copy link to clipboard

Copied

No, that's not it. The status column is part of the sharepoint document library.  I want the column on sharepoint to be updated when the pdf is signed.  When a pdf document from sharepoint is checked out and opened, it carries the sharepoint properties with it.

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 ,
Feb 26, 2021 Feb 26, 2021

Copy link to clipboard

Copied

I think that is a question that should be asked in the Micrososft support forums for Sharepoint then.

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 Beginner ,
Feb 26, 2021 Feb 26, 2021

Copy link to clipboard

Copied

I don't think so. The sharepoint properties can be edited in adobe before saving back to the sharepoint site

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 ,
Feb 26, 2021 Feb 26, 2021

Copy link to clipboard

Copied

Let me see if I can find some information about how to do 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
Community Beginner ,
Feb 26, 2021 Feb 26, 2021

Copy link to clipboard

Copied

I believe it is part of the form metadata

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 ,
Feb 26, 2021 Feb 26, 2021

Copy link to clipboard

Copied

++ EDITED REPLY, I noticed a lot of typos and some errors in my reply  and corrected them

 

Ok I see what you mean, you are referring to the Document Properties metadata and this is all done manually. So if I understood correctly you want this metadata to change once the document is signed.

 

That involves some JavaScript scripting and I'm not sure if it will throw errors.

 

I am reading a brief tutorial posted by ACP Thom Parker on how to edit the Acrobat metadata via JavScript in which it  mentions briefly about that possibility of throwing errors: Get and set PDF Metadata from Acrobat JavaScript 

 

However, following the guidance of ACP Thom Parker I was able to come up with this:

 

  • You can still modify the code that I posted above using one part of that script in a hidden text field that will detect when the signature field validity status equals zero (0, not signed). 

 

 

 

  var sigField = this.getField("mySignatureField");
  var sigStatus = sigField.signatureValidate();

  if (sigStatus == 0)  {

  this.info.title = "NOT PICKED UP";
  this.info.author = "No file ownership";
  this.info.subject = "This file is not checked in"; 

}

 

 

The result of the script above affect  the XML document properties when the form is not signed as shown below:

PICKED1.png

 

  • The second portion of the script I placed it as a signing action in the signature field, the "Signed" tab --->>> "This script executes when field is signed" . It checks if the signature field is not empty. The result of the script below is shown in the next slide

 

 

 
    var sigField = this.getField("mySignatureField");
    var sigStatus = sigField.signatureValidate();
    var theName =  sigField.signatureInfo().certificates[0].subjectCN;

    this.getField("Status").value = theName;

 if (sigField.value !=="")  {

  this.info.title = "PICKED UP";
  this.info.author = theName;
  this.info.subject = "Checking in would actually occur when the pdf is closed";

  }

 

 

 See the result below caused by the script above after the document gets signed:

 

PICKED2.png

 

So yes, this is metadata in Acrobat can be edited like this. But I am almost positive that you're not going to be able to affect the properties metadata that is displayed by the operating system in a shell environment like the File Explorer if on MS Windows,  or in a Sharepoint library  folder directly from Acrobat. 

 

This has been a topic in the past of heated arguments. 

 

The short answer is that Yes, it may be possible but it involves a lot of knowledge about the operating system's shell environment, environmental variables and COM's and the ability in a script that would be able to somehow bypass the restrictions already in place by the design behavior of the operating system itself.  Otherwise , in this context this would be "reversed engineering".

 

Adobe Acrobat JavaScript, on the other hand, also has design behaviors that would allow or not certain events and actions based on the type of context: Privileged or non-privileged.

 

So now that I know which columns you're referring to, and the fact that they are manually enabled or disabled through the Windows Explorer (on MS Windows, or whatever shell is provided by the Sharepoint or Office 365 library environment), Adobe Acrobat won't interact with those in the way that you're inquiring. You'll be able to interact with the Document Porperties XML metadata only with the Acrobat program, not the operating system's.

 

That is why I suggested earlier to consult in a Micrososft support forum and see if someone there can share how users will be able to script in such a way that you won't run into errors if, foe example,  the Windows Explorer Unicode metadata is encrypted.

 

You may want to google about the "PDF Property Extension" which back in 2015 used to allow what you're inquiring about in a MS Windows Vista environment.

 

I believe that this ability to add custom properties from a program to the Windows File Explorer was removed or deprecated.

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 Beginner ,
Mar 05, 2021 Mar 05, 2021

Copy link to clipboard

Copied

LATEST

Possibly an alternative solution to my needs would be a prompt upon closing the document that asks for updates to sharepoint properties.  If there is possibly a way to set that up it would be amazing

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