Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8533

Re: Add Attachments into Oitm object

$
0
0

Hi Feliciello,

 

This is how to use the Attachments2 object.

 

SAPbobsCOM.Attachments2 oATT = eCommon.oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oAttachments2) as SAPbobsCOM.Attachments2;
string FileName = "C:\Test\MyTest.txt";
oATT.Lines.FileName = System.IO.Path.GetFileNameWithoutExtension(FileName);
oATT.Lines.FileExtension = System.IO.Path.GetExtension(FileName).Substring(1);
oATT.Lines.SourcePath = System.IO.Path.GetDirectoryName(FileName);
oATT.Lines.Override = SAPbobsCOM.BoYesNoEnum.tYES;
//If you need to add more files :
//oATT.Lines.Add();
//The file info here
int lErr = oATT.Add();

Take the Created Object Key and feed it into your Activity.AttachmentEntry

 

Regards

Edy


Viewing all articles
Browse latest Browse all 8533

Trending Articles