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.
Start the Axapta client.
Start the Application Object Tree (AOT).
In the AOT, go to DataDictionary and then to Tables.
Expand the table that you want to modify.
Right-click the Methods node, choose Override Method, and then choose initValue.
Use the editor to specify the desired behavior for the initValue method.
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.