attachmentname = "Some description";
fileName = "full path to the file, e.g. D:\SoftProConversion\1234567\images\8764839.tif";
The type is not updated so when I click "Preview", it asks me how to the view the file, in windows.
Code: Select all
attachmentName = attachmentName.Trim();
SoftPro.OrderTracking.Client.IDocumentImage documentImage = order.DocumentImage.CreateNew();
documentImage.Trustee = order.CurrentUser;
documentImage.OriginalLocation = new Uri(fileName);
int attachmentCount = 2;
string tmp = attachmentName;
while (attachmentExists(order, tmp))
{
tmp = string.Format("{0} - {1}", attachmentName, attachmentCount);
attachmentCount++;
}
documentImage.Description = tmp;
documentImage.DocumentImageTypeID = SoftPro.OrderTracking.Client.DocumentImageType.Attached;