Тема
:
sumitsaxfactor: Getting Individual Dimension Combination Values–Using Views [AX 2012]
Показать сообщение отдельно
15.06.2012, 00:11
#
1
Blog bot
Участник
25,643
/
848
(
80
)
Регистрация: 28.10.2006
sumitsaxfactor: Getting Individual Dimension Combination Values–Using Views [AX 2012]
Источник:
http://sumitsaxfactor.wordpress.com/...views-ax-2012/
==============
In my previous post, I had illustrated how we can
get individual dimension combination values using DimensionStorage class
. In this post, I will provide another job that utilizes a view to get individual values for a ledger dimension.
The view that has been used in DimensionAttributeLevelValueAllView. Here is the job
static
void
sgxIndividualDimensionValuesUsingView(Args _args)
{
GeneralJournalAccountEntry generalJournalAccountEntry;
//Table that stores ledger transactions
DimensionAttributeLevelValueAllView dimAttrView;
//View that will display all values for ledger dimensions
DimensionAttribute dimAttr;
//Main dimension attribute table
int
i;
setPrefix
(
‘Ledger dimension breakup’
);
while
select
generalJournalAccountEntry
{
i++;
if
(i >
100
)
break
;
setPrefix
(
int2str
(i) +
“. “
+ DimensionAttributeValueCombination::find(generalJournalAccountEntry.LedgerDimension).DisplayValue);
while
select
DisplayValue
from
dimAttrView
where
dimAttrView.ValueCombinationRecId == generalJournalAccountEntry.LedgerDimension
join
BackingEntityType
from
dimAttr
where
dimAttr.RecId == dimAttrView.DimensionAttribute
{
switch
(dimAttr.BackingEntityType)
{
case
tableNum
(DimAttributeMainAccount):
info(
strFmt
(
“Main Account: %1″
, dimAttrView.DisplayValue));
break
;
case
tableNum
(DimAttributeOMBusinessUnit):
info(
strFmt
(
“Business Unit: %1″
, dimAttrView.DisplayValue));
break
;
case
tableNum
(DimAttributeCustTable):
info(
strFmt
(
“Customer: %1″
, dimAttrView.DisplayValue));
break
;
case
tableNum
(DimAttributeOMDepartment):
info(
strFmt
(
“Department: %1″
, dimAttrView.DisplayValue));
break
;
case
tableNum
(DimAttributeHcmWorker):
info(
strFmt
(
“Worker: %1″
, dimAttrView.DisplayValue));
break
;
}
}
}
}
Here is the output.
Источник:
http://sumitsaxfactor.wordpress.com/...views-ax-2012/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите
личное сообщение
администратору.
Blog bot
Посмотреть профиль
Найти ещё сообщения от Blog bot