Retrieves the key of the last added record.
| Visual Basic |
|---|
Public Sub GetNewObjectCode( _ ByRef ObjectCode As String _ ) |
After you create a new object such as, BusinessPartners and Items objects, you can use this method to retrieve the object key. If no new object is found, the method returns an empty string in the ObjectCode parameter.
You can use this method, for example, to create a payment based on an invoice: