Insert Method

The Insert method inserts the Axapta record into the database. Calling this method resembles calling the insert member method of a record in the Axapta X++ language.

Namespace:  Microsoft.Dynamics.BusinessConnectorNet
Assembly:  Microsoft.Dynamics.BusinessConnectorNet (in Microsoft.Dynamics.BusinessConnectorNet.dll)


Public Sub Insert
Dim instance As AxaptaRecord

public void Insert()
void Insert()


Exception Condition

An unexpected error has occurred with the Business Connector.


An attempt has been made to access an invalid record.


Every Axapta table has a default X++ insert method. This method is invoked when calling the InitValue method from the Axapta Business Connector. To specify new default values for table columns that override the table’s default X++ insert method, use the following procedure.

  1. Start the Axapta client.

  2. Start the Application Object Tree (AOT).

  3. In the AOT, go to DataDictionary and then to Tables.

  4. Expand the table that you want to modify.

  5. Right-click the Methods node, choose Override Method, and then choose insert.

  6. Use the editor to specify the desired behavior for the insert method.

  7. Close the editor.

The behavior is the same for initValue and update. If you want to execute your own code in the context of these operations, override the corresponding methods.

See Also

AxaptaRecord Class

Microsoft.Dynamics.BusinessConnectorNet Namespace