on 05-01-2013 5:48 AM
My client has a an issue where when they create a Ar Delivery document Based on a sales Order, the attatchment information that was in the sales order does not get copied to the delivery.
so as of SAP Business one version 8.82 PL 09 this is still the case.
Thinking of giving an addon to manage this BUT, I cannot locate the method to create an attachment with the SAPbobsCOM.Documents object.
This leaves me with direct insert to SQL but I will not do that given support requirements with SAP.
Any ideas will be appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pedro,
have you tried doing this in V9 ?
I have receivded message from SAP that this cannot be done in Version 9. Could they be wrong ?
I dont have a Version 9 machine yet to test this fucntionality so will need to rely on external informaiton.
Worst case I will need to prepare a pc with V9 and that is too cumbersome at this stage just to tell customer this is possible or not.
Hi Indika,
Eventhough the Help Files only mention attachment supporting : Contacts, ContractTemplates, CustomerEquipmentCards, EmployeeInfo, KnowledgeBaseSolutions, Messages, Message, SalesOpportunities, and ServiceContracts.
Below is my test code which work perfectly fine with Delivery Object.
SAPbobsCOM.Attachments2 oAtt = (SAPbobsCOM.Attachments2)oC.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oAttachments2);
if (System.IO.File.Exists("C:\\TestFile.txt"))
{
oAtt.Lines.SourcePath = "C:";
oAtt.Lines.FileName = "TestFile";
oAtt.Lines.FileExtension = "txt";
int iErr = oAtt.Add();
int AttEntry = 0;
if (iErr == 0)
{
AttEntry = int.Parse(oC.GetNewObjectKey());
SAPbobsCOM.Documents oDLN = (SAPbobsCOM.Documents)oC.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDeliveryNotes);
oDLN.CardCode = "C23900";
oDLN.AttachmentEntry = AttEntry;
oDLN.Lines.BaseEntry = 362;
oDLN.Lines.BaseType = 17;
oDLN.Lines.BaseLine = 0;
iErr = oDLN.Add();
if (iErr != 0) MessageBox.Show(oC.GetLastErrorDescription());
}
}
I'm on Release Version of SBO9 PL4.
Regards
Edy
User | Count |
---|---|
110 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.