Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.

Moderators: ArturoRobles, ArturoRobles

Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
Can I download all the attachment files in dynaform only with one button/click?
Because sometimes my dynaform contains many uploaded documents and it's gonna be good for the user if they can download all of it at the same time instead of download the file one by one. Thankyou for your help.
There is no easy way to implement this.

You can download a single file in a MultipleFile field with this JavaScript:

Where MultipleFileID is the ID of the Multiple File field and X is the index number, such as 0, 1, 2, 3, etc.

However when I tried this code, I found that FireFox 60 and Chrome will only allow you to download one file and ignores the other download attempts. I tried this code:
Code: Select all
$("#downloadAll").find("button").click( function() {
  var aFiles = $("#specFiles").find("a.fa-download");
  var i = aFiles.length - 1;
  for (; i >= 0; i--) {
} );
I also tried using a settimeout() to download at different times, but I couldn't get it to work.

The only solution is to fire a trigger beforehand that queries the APP_DOCUMENT table in the database, and then uses exec("tar -cf files_case_X.tar file1 file2 file3") to create a tar file which contains all the files from the case. Then, use PMFAddInputDocument() or G::uploadFile() to add that tar file to the case. Then, display a link in the Dynaform to download that tar file.

Can anyone know what is the issue?

Unable to create workspace

I have the same issue. Any solution? Thanks alex[…]

Install in ubuntu

Dear All, In our dev environment we did an upgrad[…]

Get data from oracle database.

How to display all data in a table from oracle DB […]