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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 01.03.2020, 13:16   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
ievgensaxblog: MSDyn365FO. OData integration, how-to set financial dimensions.
Источник: https://ievgensaxblog.wordpress.com/...al-dimensions/
==============

As we know, we can add financial dimensions as separate columns to Excel templates, but what about OData integration?

To set dimensions you must assign a value to DefaultDimensionDisplayValue or AccountDisplayValue fields. They can have different names, but essentially, we are talking about DisplayValue field on DimensionCombinationEntity and DimensionSetEntity entities. This value represents all dimensions separated by a delimiter. You have to configure it on the “Financial dimension configuration for integrating applications” form.

For example, we have 3 dimensions: CostCenter, Department, BusinessUnit. Delimiter set to “-“. Values are “A”, B”, “C”, so we need to use “A-B-C” string. However, we do not want to hard-code delimiter or order of the dimensions. We want to make sure that we use only dimensions configured!

There are 2 OData actions available: getSetDisplayValue on DimensionSetEntity entity and getCombinationDisplayValue on DimensionCombinationEntity entity.

getSetDisplayValue accepts two arrays: array of attribute names and array of attribute values. It skips dimensions that are not configured and returns delimited string.

POST /data/DimensionSets/Microsoft.Dynamics.DataEntities.getSetDisplayValueBody{ "_attributeNames" : ["CostCenter", "Department", "BusinessUnit"], "_attributeValues" : ["A", "B", "C"]}Successful Response:HTTP/1.1 200 OK{ "@odata.context" : "https:///data/$metadata#Edm.String", "value" : "A-B-C”}getCombinationDisplayValue accepts entity name, dimension field name, two arrays (array of attribute names and array of attribute values) and account type.

POST /data/DimensionCombinations/Microsoft.Dynamics.DataEntities.getCombinationDisplayValueBody{ "_entityName" : "CustomerPaymentJournalLine", "_propertyName" : "OffsetAccount", "_attributeNames" : ["MainAccount", "CostCenter"], "_attributeValues" : ["1000", "A"], "_ledgerJournalACType" : "Ledger"}Successful Response:HTTP/1.1 200 OK{ "@odata.context" : "https:///data/$metadata#Edm.String", "value" : "1000-A"}Both methods use DimensionResolver::getEntityDisplayValue() under the hood that replaced AxdDimensionUtil in current version.



Источник: https://ievgensaxblog.wordpress.com/...al-dimensions/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
ievgensaxblog: MSDyn365FO. How to Import CSV file using Electronic Reporting. Part 2 – Format. Blog bot DAX Blogs 0 06.02.2019 07:12
stoneridgesoftware: How to Set up Required Dimensions in Dynamics 365 Business Edition Blog bot DAX Blogs 0 03.08.2017 00:13
fed: Net requirements update in MRP Module and Working Set of MRP Blog bot DAX Blogs 14 08.05.2012 13:09
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
wiki.dynamicsbook: Changes Made in Navision Attain 3.60 Blog bot Dynamics CRM: Blogs 0 02.09.2008 13:23

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

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

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