Hello,
I'm trying to attach files with the Attachments2 object in SBO 2005 and i need to get the autogenerate key (AbsoluteEntry) after adding an attachment.
SBO help says:
AbsoluteEntry Returns the identification key of the attachment file as assigned by SAP Business One when adding an attachment file.
But after calling the add method the property is always set to 0 even if the AbsEntry field in the record created in ATC1 is correctly valued.
Here is my code:
dsa_Attach.Lines.Add()
dsa_Attach.Lines.FileName = "test"
dsa_Attach.Lines.FileExtension = "txt" dsa_Attach.Lines.SourcePath = "c:\"
dsa_Attach.Lines.Override = SAPbobsCOM.BoYesNoEnum.tYES
ReturnCode = dsa_Attach.Add()
debug.writeline(dsa_Attach.AbsoluteEntry) 'always 0 (ReturnCode = 0)
If anyone has some hints .....
Thanks
Fabrice.
PS: i also wonder why there is no "remove" method in this object (?)
Message was edited by: Fabrice NANNI
Message was edited by: Fabrice NANNI