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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 08.09.2012, 08:32   #1  
Blog bot is offline
Blog bot
Участник
 
25,644 / 848 (80) +++++++
Регистрация: 28.10.2006
sumitsaxfactor: Remove a Financial Dimension Value
Источник: http://sumitsaxfactor.wordpress.com/...mension-value/
==============

Here is a job that can help you remove or blank out a financial dimension.

Note the Dimensions before executing this job



Job

staticvoid sgxRemoveWorkerDimension(Args _args)

{

/*

* We will Remove a worker dimension in this example

*/

CustTable custTable = CustTable::find(‘CUS-00004′); //Customer Record containing Financial Dimension

DimensionSHA1Hash hash; //To store the calculated hash for DimensionAttributeValueSet

DimensionAttribute dimAttr; // Contains the financial dimensions records

DimensionAttributeValue dimAttrValue; // Contains used financial dimension values

DimensionAttributeValueSet dimAttrValueSet; //Contains default dimension records

DimensionAttributeValueSetItem dimAttrValueSetItem; //Contains individual records for default dimensions

DimensionAttributeSetItem dimAttrSetItem; // Contains the number of dimensions active for a account structure ledger



HashKey valueKeyHashArray[]; //To store the has key of dimension in question

Map dimAttrRecId, dimAttrStr; //To store the dimension attribute recid and dimension attribute value display value

Set dimAttrValueRecId;

SetEnumerator setEnum;

int dimAttrCount, i;





//Initialize the map to store the backing entity types

dimAttrRecId = new Map(Types::Int64, Types::Integer);

dimAttrValueRecId = new Set(Types::Int64);

dimAttrStr = new Map(Types::Int64, Types::String);



//Find all the active dimensions for current ledger except main account and store there

//backing entity type in the map

whileselect RecId from dimAttr

orderby Name

where dimAttr.Type != DimensionAttributeType::MainAccount

join RecId from dimAttrSetItem

where dimAttrSetItem.DimensionAttribute == dimAttr.RecId &&

dimAttrSetItem.DimensionAttributeSet == DimensionCache::getDimensionAttributeSetForLedger()

{

dimAttrCount++;

dimAttrRecId.insert(dimAttr.RecId, dimAttrCount);

}



//initialize hash key array to null


<span><font face="Consolas"><font size="2">for (i = 1<font color="#000000">; i
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
sumitsaxfactor: Replacing Financial Dimension in Ledger Dimension–Version 2 [AX 2012] Blog bot DAX Blogs 0 30.01.2012 17:11
sumitsaxfactor: Replacing Financial Dimension in Ledger Dimension Blog bot DAX Blogs 0 19.01.2012 13:11
sumitsaxfactor: Replace a Financial Dimension in Default Dimensions [AX 2012] Blog bot DAX Blogs 0 18.01.2012 11:11
Khue Trinh: Setting up a link between a financial dimension and the site inventory dimension Blog bot DAX Blogs 0 09.11.2010 19:04
Khue Trinh: Setting up a link between a financial dimension and the site inventory dimension Blog bot DAX Blogs 0 27.09.2010 13:05

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

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

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