Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

Populate Default Dynamic Filename In Adobe Form (On Click of Save in Menu) - SAP

Avatar

Former Community Member

Hi,


We have a scenario in which we want to populate the file name dynamically in Adobe form integrated in SAP Webdynpro.


Scenario - 

A adobe form has been intergrated in the SAP webydnpro application which opens the form in Web Browser (IE).

There is a save button which is part of standard adobe form menu and on click of that save button (circled - 1 in image )  the name of the form ( i.e techincal name of adobe form created in SAP {ZTESTSS} ( circled - 2 in image ) appears.

adobe_save_as.png

We want to change the default name to (employee_date_time ) on click of save.
We have found a approch by using the folder level javascripts (http://forums.adobe.com/message/2266799#2266799%232266799).


In case we use folder level scripts "where should we write the JavaScript code in the Adobe Form to trrigger the this script on click of Save Button (in the menu)?"


Also is there any other apporch which does not require folder level javascript as its a security issue also we need to maintain in all the user systems.


Please let me know the approch to address the issue.


Thanks .

Tausif

2 Replies

Avatar

Level 10

Hi,

you can't change the behavior of the save button in the browser nor in Reader/Acrobat.

You can add a custom button within your form which calls a custom script from a folder level script using the browserForDoc method.

The browseForDoc methos is the only one whcih can change the name in the saveAs dialog.

Here's an example., you can run from Acrobat console.

You need to combine it with the solution from the other thread to make it work with your form.

http://forums.adobe.com/message/2266799#2266799%232266799

var oRetn = app.browseForDoc({

    bSave: true,

    cFilenameInit: "MyForm.pdf",

    cFSInit: "",

    });

 

if (typeof oRetn !== "undefined") {

    this.saveAs({

        cFS: oRetn.cFS,

        cPath: oRetn.cPath,

        bPromptToOverwrite: false

    });

}

Avatar

Former Community Member

Hi,

Thanks for the quick reply.

I am not sure if the user would agree to include the Save button to achieve this functionality, as we need to implement this across all the forms to be developed.