glenys
14th April 2016, 16:38
Hi All,

Anyone know how to use these functions:

client.prepare.download
client.add.download
client.start.download

Thanks for ane help.

mark_h
15th April 2016, 15:25
Found this thread when search - not sure how much help it will be - http://www.baanboard.com/baanboard/showthread.php?t=67004&highlight=client+start+download.

bhushanchanda
19th April 2016, 17:41
Hi,

Refer this code -

declaration:
long id,ret
#include <bic_desktop>
before.program:

message("Creating ID")
id = client.prepare.download () |# Generate the download identifier
message("Adding 1st File to ID")
ret = client.add.download.file(id,"test1.csv") |# Add files to the identifier, test1.csv is the full path of the file name on the server to be downloaded
if ret = 0 then
message("Adding 2nd file to ID")
ret = client.add.download.file(id,"test2.csv")
if ret = 0 then
message("Downloading Files")
ret = client.start.download(id) |# Once adding is completed, download the files
if ret < 0 then
message("Unable to download the files!")
endif
else
message("Failed adding 2nd file")
endif
else
message("Failed adding 1st file")
endif

Note- This will only work on LN UI

glenys
20th April 2016, 15:32
Thank you very much,
helped me a lot!
It was exactly what I needed.

showstuff11
1st February 2018, 12:12
Hi,

Refer this code -

declaration:
long id,ret
#include <bic_desktop>
before.program:

message("Creating ID")
id = client.prepare.download () |# Generate the download identifier
message("Adding 1st File to ID")
ret = client.add.download.file(id,"test1.csv") |# Add files to the identifier, test1.csv is the full path of the file name on the server to be downloaded
if ret = 0 then
message("Adding 2nd file to ID")
ret = client.add.download.file(id,"test2.csv")
if ret = 0 then
message("Downloading Files")
ret = client.start.download(id) |# Once adding is completed, download the files
if ret < 0 then
message("Unable to download the files!")
endif
else
message("Failed adding 2nd file")
endif
else
message("Failed adding 1st file")
endif

Note- This will only work on LN UI

good day, can this code download multiple files onetime only? without having constantly clicking download on the pop up window?

i am using 10.4