Sunday, July 3, 2016

Ledger Dimension Value by account structure name using AxDimensionUtil

//Ledger Dimension Value by account structure name and AxDimensionUtil
static void GetLedgerDimensionandAccstructure(Args _args)
{
    RecId fromLedgerdimension = 5637145334;
    RecId toLedgerdimension;
    toLedgerdimension = DimensionDefaultingService::serviceCreateLedgerDimension(fromLedgerdimension);
    info(strFmt("From RecId %1 to %2", fromLedgerdimension, toLedgerdimension));   
    info(strFmt("From Display value %1 to %2",
                conPeek(AxdDimensionUtil::getLedgerAccountValue(fromLedgerdimension), 1),
                conPeek(AxdDimensionUtil::getLedgerAccountValue(toLedgerdimension), 1)));
    info(strFmt("From Account structure %1 to %2",
        DimensionStorage::getAccountStructureFromLedgerDimension(fromLedgerdimension).Name,
        DimensionStorage::getAccountStructureFromLedgerDimension(toLedgerdimension).Name));    
}

No comments:

Post a Comment

Search hierarchy for a match (TableALLGroup) X++

  Table1 ppt;  select firstonly ppt  order ItemCode, ItemRelation, AccountCode, AccountRelation where      (ppt.ItemCode == TableGroupAll::T...