I have new table. In which I created two new fields
Name → AccountNum, EDT–> DimensionDynamicAccount
Name → AccountType, EDT–> LedgerJournalACType
Now I want look up same as in “LedgerJournalTransDaily” form. i.e When Accounttype == Ledger then Lookup from LedgerAccount
When Accounttype == Customer then Lookup from CustTable.
For This I have followed the step in Page 19 in white paper"Implementing_the_Account_and_Financial_Dimensions_Framework_AX2012" which is given below
Microsoft Dynamics AX form control
The Multi-Type Account control represents a combination of the Segmented Entry control and the DimensionDynamicAccountController class. The Segmented Entry control is a general-purpose control that has been introduced in Microsoft Dynamics AX 2012. The
class handles the events raised by the Segmented Entry control. This combination allows the control to handle accounts of several different types.
Changes needed on the form
In simple scenarios, the changes needed on the form are as follows:
Verify that the table that will hold the foreign key to the DimensionAttributeValueCombination table is a data source on the form.
Drag the LedgerDimension field from the data source to the desired location on the form design. This action should add a Segmented Entry control at this location on the form with appropriate
DataSource and ReferenceField property values. Alternatively, you can complete this step by adding a Segmented Entry control to the design and manually setting the DataSource and ReferenceField
- Override the following methods on the form.
public class FormRun extends ObjectRun
init (for the form):
public void init()
dimAccountController = DimensionDynamicAccountController::construct(
- Override the following methods on the Segmented Entry control instance in the form design.
public void jumpRef()
public void loadAutoCompleteData(LoadAutoCompleteDataEventArgs _e)
public void segmentValueChanged(SegmentValueChangedEventArgs _e)
public void loadSegments()
// (Optional parm*() specification should go here, see the Control options section.)
public boolean validate()
isValid = super();
isValid = dimAccountController.validate() && isValid;
- Override the following methods on the data source field that backs the Segmented Entry control.
public Common resolveReference(FormReferenceControl _formReferenceControl)
Now my problem is Lookup only works for AccountType==“Ledger” not for customer, Vendor etc.
it appears like
Please help me out in this