Share via


LedgerJournalEngine.onPrimaryAccountSegmentChanged Method [AX 2012]

Performs updates when the main account is changed.

Syntax

public RecId onPrimaryAccountSegmentChanged(
    DimensionDynamicAccountController _dimController, 
    RecId _currentMainAccountId, 
    LedgerJournalTrans _ledgerJournalTrans)

Run On

Called

Parameters

Return Value

Type: RecId Extended Data Type
The ID of the new main account.

Remarks

This method is designed to delegate the functionality that is needed by the segmentValueChanged method.

The account controller always calls the segmentValueChanged when a segment changes for the ledger type.

However, the control only calls the segmentValueChanged method for non-ledger types when typing into the control.

Hence, for lookups, the segmentValueChanged method is not called. Defaulting for non-ledger types is handled by the field modified method in the data source.

This method is a no-op for non-ledger types, as the code will early out (main account will not exist).

See Also

Reference

LedgerJournalEngine Class