Apr 15, 2016

LedgerDimension 조합 하기

static DimensionDynamicAccount findLedgerDimension(str _MainAccount,
              str _CostCenter)
{
    RecId   _RecIdMainAccount;
    RecId   _RecIdCostCenter;

    DimensionDynamicAccount         _SetLedgerDimension;


    if (_MainAccount)
    {
        _RecIdMainAccount =  DimensionStorage::getDefaultAccountForMainAccountNum(_MainAccount);

        if (_CostCenter)
        {
            _RecIdCostCenter        =       AxdDimensionUtil::getDimensionAttributeValueSetId([1,"CostCenter",_CostCenter]);
        }

        _SetLedgerDimension = DimensionDefaultingService::serviceCreateLedgerDimension(_RecIdMainAccount,_RecIdBudgetItem,_RecIdCostCenter,_RecIdWorkCenter);
    }
    else
    {
        _SetLedgerDimension = 0;
    }

    return _SetLedgerDimension;
}

No comments:

Post a Comment