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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 11.03.2009, 19:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,506 / 847 (80) +++++++
Регистрация: 28.10.2006
axaptapedia: Dimensions
Источник: http://www.axaptapedia.com/Dimensions
==============

Summary:

==Programming against dimensions==

The usual method of programming against a specific dimension in Ax is as follows:


salesTable.Dimension[SysDimension::Center + 1] = 'The cost centre';


However, this code is not technically correct. It relies on the enum value of the dimension matching the array dimension (plus 1), which is not guaranteed. If a developer follows Microsoft's best practice guide and gives a non-sequential enum value to a new financial dimension (e.g. 100) then the code will not work.

It is better to use the following pattern when assigning to/reading from specific dimensions in X++ code. This maps the dimension to the correct array index, irrespective of the enum value.


salesTable.Dimension[Dimensions::code2ArrayIdx(SysDimension::Center)] = 'The cost centre';



Источник: http://www.axaptapedia.com/Dimensions
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
Старый 11.03.2009, 22:21   #2  
ZVV is offline
ZVV
MCITP
MCP
Oracle
MCBMSS
 
1,006 / 246 (11) ++++++
Регистрация: 13.02.2004
Адрес: Минск
->
Век живи......
__________________
Zhirenkov Vitaly
Старый 12.03.2009, 14:31   #3  
_scorp_ is offline
_scorp_
Участник
Аватар для _scorp_
MCBMSS
 
488 / 369 (13) ++++++
Регистрация: 25.07.2007
Адрес: Москва
Главное не спутать с функцией arrayIdx2Code, а то будет беда
Теги
dimensions

 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
palleagermark: Adding new financial dimensions to AX Blog bot DAX Blogs 1 17.02.2009 13:03
axcoder: PowerShell + Ax Blog bot DAX Blogs 1 09.01.2009 18:05
axaptapedia: Load Web Documents Blog bot DAX Blogs 1 03.01.2009 23:50
jerry-dynamics: dimensions hierarchy controls Blog bot DAX Blogs 0 16.06.2007 11:20

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

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

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 06:36.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.