11.03.2009, 19:05 | #1 |
Участник
|
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 |
MCITP
|
Век живи......
__________________
Zhirenkov Vitaly |
|
12.03.2009, 14:31 | #3 |
Участник
|
Главное не спутать с функцией arrayIdx2Code, а то будет беда
|
|