Hello.
I'm adding some documents via DI API. Actually it's 3 documents and i'm adding them using transaction control.
I need the DocEntry of the second document but after Document.Add(), the method Company.GetNewObjectKey() returns empty.
When I commit the transaction, it succesfully create the documents.
What am I doing wrong?
Code sample:
if (lDocumento.Add() != 0) { return false; } DataSource.SetValue(DataSourceUIDs.CodigoPedidoVenda, 0, mAddOn.Connection.Database.GetNewObjectKey()); //<= Returns empty