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

Copy Markup charges while posting purchase invoice using X++

 Copy Markup charges while posting purchase invoice using X++ Class: Important: Code logic is just for Reference.  New class => Duplicate...