Adding documents manually
Moderator: Phil Barton
Adding documents manually
Is there any way through the API to manually add documents to SPImage? I'd like to be able to mimic the behavior that occurs when you use the Publish button on the Documents tab in ProForm.
Re: Adding documents manually
You should be able to do this:
When the order is saved, the storage item will be pushed through whatever document storage system is currently registered in the Integration service (StorageSystem attribute).
Code: Select all
private void AddAttachment( SoftPro.OrderTracking.Client.IOrder order, string file )
{
try
{
SoftPro.OrderTracking.Client.IDocumentImage documentImage = order.DocumentImage.CreateNew( );
documentImage.Trustee = order.CurrentUser;
documentImage.OriginalLocation = new Uri( file );
documentImage.Description = "My Description";
documentImage.DocumentImageTypeID = SoftPro.OrderTracking.Client.DocumentImageType.Attached;
}
}