Download file from grid?

Hello,

Ik have a grid with a field (text) that contains a filename based on other fields of the record (thru the onrecord event).
Now i want to add the possibilty to download the file from the grid?

What is the best way to do this? i tried to add a field of type “document (filename)”
I can see a link then, but when i click there is a blank page and scriptcase seems to load a php file?

Kind regards,

Marco

[QUOTE=mgreven70;31165]Hello,

Ik have a grid with a field (text) that contains a filename based on other fields of the record (thru the onrecord event).
Now i want to add the possibilty to download the file from the grid?

What is the best way to do this? i tried to add a field of type “document (filename)”
I can see a link then, but when i click there is a blank page and scriptcase seems to load a php file?

Kind regards,

Marco[/QUOTE]

Your approach is basically ok, but you need to set the download directory. While deploying (advanced) you can set this directory. Or you have to put the files on the default directory.

What do you mean with the download directory?
The files are in a seperate folder on the server or networkshare.

Based on some fields the directory (or the path in the field) where the files are is known.

The document(filename) field is working against the default download directory of scriptcase. So if you want to use that then you need to comply to SC rules to get it working. If you need to download from other locations than you need to create fields containing hyperlinks to those files or integrate some custom php to allow this.

OK… then document(filename) is not working for me.

Is there a sample where i can look how to do this?

document filename works fine but you have to make an advanced deployment and set the paths properly. Then you have to deploy with that advanced deployment. Aducom was totally right.

Or just build a link ponting to the location of the file to download

But linking directly to a download location might have security issues depending on what’s stored there…

But you can’t lock navigation access and just access download if you have the link.