InitValue Method

The InitValue method initializes the fields of the Axapta record. Calling this method resembles calling the initValue member method of a record in the Axapta X++ language

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

Syntax

'Declaration
Public Sub InitValue
'Usage
Dim instance As AxaptaRecord

instance.InitValue()
public void InitValue()
public:
void InitValue()

Exceptions

Exception Condition
BusinessConnectorException

An unexpected error has occurred with the Business Connector.

AxaptaRecordNotValidException

An attempt has been made to access an invalid record.

Remarks

Every Axapta table has a default X++ initValue 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++ initValue 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 initValue.

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

  7. Close the editor.

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

See Also

Reference

AxaptaRecord Class

Microsoft.Dynamics.BusinessConnectorNet Namespace