Monday, August 28, 2017

Ledger dimension in to Table and FORM

//Addding Ledger dimension in to Table and FORM
//Table
//Table1
//Drag -> ledgerDimensionAccount EDT to Table1
//Field Named as Accountledger
//Relations - Normal - DimensionAttributeValueCombination(RecId) -- Table1(NewFieldName)
//Form
->Class Declaration
LedgerDimensionDefaultAccountController AccountController;
->Init
AccountController                 = LedgerDimensionDefaultAccountController::construct(Table1_ds, fieldStr(Table1, Accountledger));
AccountController.parmControl(Group_AccountLedger);
AccountController.parmFilterLedgerPostingType(LedgerPostingType::None);
->Datasource(Table1)-Field(Accountledger)-Method-
public Common resolveReference(FormReferenceControl _formReferenceControl)
{
    return AccountController.resolveReference();
}
-> Design Group Control - field - Overide Method
public void jumpRef()
{
    AccountController.jumpRef();
}
public void loadAutoCompleteData(LoadAutoCompleteDataEventArgs _e)
{
    AccountController.loadAutoCompleteData(_e);
    super(_e);
}
public void loadSegments()
{
    super();
    AccountController.loadSegments();
}
public void segmentValueChanged(SegmentValueChangedEventArgs _e)
{
    super(_e);
    AccountController.segmentValueChanged(_e);
}
public boolean validate()
{
    boolean isValid;
    isValid = super();
    isValid = AccountController.validate() && isValid;
    return isValid;
}

No comments:

Post a Comment

Convert Call stack to readable format in D365FO X++

//Input --container _xppCallStack = xSession::xppCallStack();  Public static str POL_formatXppCallStack(container _xppCallStack, int _skipFr...