AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 15.06.2012, 00:11   #1  
Blog bot is offline
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

staticvoid 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’);

whileselect generalJournalAccountEntry

{

i++;

if (i > 100)

break;



setPrefix(int2str(i) + “. “ + DimensionAttributeValueCombination::find(generalJournalAccountEntry.LedgerDimension).DisplayValue);

whileselect DisplayValue from dimAttrView

where dimAttrView.ValueCombinationRecId == generalJournalAccountEntry.LedgerDimension

join BackingEntityType from dimAttr

where dimAttr.RecId == dimAttrView.DimensionAttribute

{

switch (dimAttr.BackingEntityType)

{

casetableNum(DimAttributeMainAccount):

info(strFmt(“Main Account: %1″, dimAttrView.DisplayValue));

break;



casetableNum(DimAttributeOMBusinessUnit):

info(strFmt(“Business Unit: %1″, dimAttrView.DisplayValue));

break;



casetableNum(DimAttributeCustTable):

info(strFmt(“Customer: %1″, dimAttrView.DisplayValue));

break;



casetableNum(DimAttributeOMDepartment):

info(strFmt(“Department: %1″, dimAttrView.DisplayValue));

break;



casetableNum(DimAttributeHcmWorker):

info(strFmt(“Worker: %1″, dimAttrView.DisplayValue));

break;

}

}

}



}



Here is the output.






Источник: http://sumitsaxfactor.wordpress.com/...views-ax-2012/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
emeadaxsupport: Dynamics AX 2012 cubes - Customer dimension does not show values for Address description, Zip postal code, country or region id Blog bot DAX Blogs 0 27.04.2012 16:11
sumitsaxfactor: Getting Individual Dimension Combination Values–Dimension Storage class [AX 2012] Blog bot DAX Blogs 0 16.12.2011 18:11
emeadaxsupport: New Content for Microsoft Dynamics AX 2012 : October 2011 Blog bot DAX Blogs 0 27.10.2011 17:11
axinthefield: Dynamics AX Event IDs Blog bot DAX Blogs 0 01.03.2011 22:11
daxdilip: Whats New in Dynamics AX 2012 (A brief extract from the recently held Tech Conf.) Blog bot DAX Blogs 7 31.01.2011 12:35

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 01:28.