Skip to Content
0
Nov 08, 2014 at 01:19 PM

GetNewObjectCode Method of Company Object

264 Views

Hi,

As per the SDK Reference, the GetNewObjectCode method of the Company Object retrieves the key of the last added record.

"

You can use this method, for example, to create a payment based on an invoice:

  1. Create invoice.
  2. Get the key for identifying the invoice (Invoices property of the Payments object).
  3. Create the payment.

"

Suppose between Step 1 and Step 2, another user creates an Invoice, or even same user creates an Invoice manually using the SBO application . What values will the GetNewObjectCode method return? Is it guaranteed to return the key of the last object created by the current user in the current session?

If not, what is the other way?

Thanks.