Sends a file from a Microsoft Dynamics NAV service to a RoleTailored client.
[Ok :=] DOWNLOAD(FromFile, DialogTitle, ToFolder, ToFilter, ToFile)
The name of the file that you want to download to the client.
The title that you want to display on the dialog box.
The name of the folder that is displayed in the dialog box. This is the default value, which can be changed.
The type of file that is displayed in the dialog box. This is the default value, which can be changed.
The file name that is shown in the dialog box. This is the default , which can be changed.
Property Value/Return Value
If you omit this optional return value, a run-time error occurs if the file cannot be found. If you include a return value, it is assumed that you will handle any errors.
true if the file was downloaded; otherwise, false.
In the new architecture, the business logic is run on the middle-tier server and not on the client.
This means that in Microsoft Dynamics NAV, files are created on the Microsoft Dynamics NAV service and not locally on the client computer as is the case in the Classic client. When you write code for the application, you must therefore remember where the files are created.
and are used to send a file from a RoleTailored client to a Microsoft Dynamics NAV service.
and are used to send a file from a Microsoft Dynamics NAV service to a RoleTailored client.
We recommend that you use the functions in Codeunit 419, 3-Tier Automation Mgt., to upload and download files.
This example shows how to use the DOWNLOAD function. It requires that you create the following variable.
ToFile := 'ToFile.txt'; DOWNLOAD(‘FromFile.txt’,‘Download file’,’C:\’,’Text file(*.txt)|*.txt’,ToFile)