| GetNew ObjectCode Method | |
| See Also |
- ObjectCode
- Gets the key of the last object that you have created.
Retrieves the key of the last added record.
| Visual Basic |
|---|
Public Sub GetNewObjectCode( _
   ByRef ObjectCode As String _
) |
- ObjectCode
- Gets the key of the last object that you have created.
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:
- Create invoice.
- Get the key for identifying the invoice (Invoices property of the Payments object).
- Create the payment.