Attaching a file to the defacing object
Only a local file can be added to the notification object. Therefore, we first download the document in the related documents object to the locale and then add it to the information e-mail. Put the function object here in front of the information object in the flowchart.
Project References
%SystemPath%\Common\eBAPI.dll
using System.IO;
using eBAPI;
using eBAPI.Connection;
using eBAPI.DocumentManagement;
public void Fonksiyon1_Execute()
{
eBAConnection con = CreateServerConnection();
Con. open();
FileSystem fs = con. FileSystem;
DMFile fl = fs. GetWorkflowFile(Document1.ProfileId); We take the form we are in. FormID
foreach(DMFileRelation dmc in fl. GetRelations())
{
DMFile path = fs. GetFile(dmc.Path); for naming and access to the file
string name = path. GetContent(). ContentName;
pathe IIS_IUSRS be IUSR Users on the server may need to be authorized to the Folder
string LocalPath ="C:\\BimserSolution\\eBA\\eba.net\\FormImages\\dmFile\\"+name;
path. DownloadContentToFile(LocalPath);
Information1.AddAttachment(LocalPath);
File.Delete(LocalPath); To delete a downloaded file
throw new Exception(name +" "+dmc.Path);
}
Con. Close();
}