Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8150

GetNewObjectKey() returning empty

$
0
0

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

Viewing all articles
Browse latest Browse all 8150

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>