Retrieving the document with code from the dm and downloading it to the locale
With the code at the bottom, you can download documents from DM to local.
public void fnDmLocal_Execute()
{
eBAConnection con = CreateServerConnection();
string path=@"Education/sample.pdf"; Dm doc pathi
Try
{
Con. open();
FileSystem fs = con. FileSystem;
string folderPath=@"C:\\TEMP";
System.IO.Directory.CreateDirectory(folderPath);
Fs. DownloadFileContentToFile(path,folderPath + "\\" + "sample.pdf");
}
catch (Exception ex)
{
throw new Exception(" An error ocured while copying attachments!\n" + ex. Message);
}finally
{
Con. Close();
}
}