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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 14.09.2017, 13:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
alirazazaidi: Custom financial Dimension shows in lookup D365 for Finance and operations
Источник: https://www.tech.alirazazaidi.com/cu...nd-operations/
==============

I one of last post, I added the custom financial dimension in D365 for finance and operations.
You can find this post here
https://www.tech.alirazazaidi.com/cu...erations-ax-7/

In next post I load financial dimension in custom lookup.
Custom lookup for Financial Dimension D365 for Finance and Operations (Dynamics Ax 7)

But above link shows only out of the box financial dimensions. But what about custom financial dimension,

I tested the following code snippet works custom dimension. It load custom dimension mentioned in
Custom Financial Dimension in Dynamics 365 for Finance and Operations (AX 7)


[FormControlEventHandler(formControlStr(FrmTestDetail, FormStringControl1), FormControlEventType::Lookup)]
public static void FormStringControl1_OnLookup(FormControl sender, FormControlEventArgs e)
{

SysTableLookup sysTableLookup;
Query query;
QueryBuildDataSource qbdsDimensionFinancialTag;
QueryBuildRange qbrFinancialTagCategory;
String20 LC;
RecId _recid;
DimensionAttribute _attribute;
Name _name=’jaggah_tax’;

;
// super();

//#define.MyCustomFinancialDimension(‘LC’)
// select * from attribute where attribute.Name ==_name;
// recid = attribute.financialTagCategory();

query = new Query();
qbdsDimensionFinancialTag = query.addDataSource(tableNum(DimensionFinancialTag));
qbrFinancialTagCategory = qbdsDimensionFinancialTag.addRange(fieldNum(DimensionFinancialTag, FinancialTagCategory));
qbrFinancialTagCategory.value(strFmt(‘%1’, DimensionAttribute::findByName(_name, false).financialTagCategory()));

sysTableLookup = sysTableLookup::newParameters(tableNum(DimensionFinancialTag), sender,true);
sysTableLookup.addLookupfield(fieldNum(DimensionFinancialTag, Value), true);
sysTableLookup.addLookupfield(fieldNum(DimensionFinancialTag, Description));
sysTableLookup.addSelectionField(fieldNum(DimensionFinancialTag, FinancialTagCategory));
sysTableLookup.parmQuery(query);

sysTableLookup.performFormLookup();

FormControlCancelableSuperEventArgs ce = e as FormControlCancelableSuperEventArgs;
//cancel super() to prevent error.
ce.CancelSuperCall();

}

Output is here





Источник: https://www.tech.alirazazaidi.com/cu...nd-operations/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
sumitsaxfactor: Custom Financial Dimensions – D365 Blog bot DAX Blogs 0 10.09.2017 03:51
stoneridgesoftware: Filtering Lookup by Relation in Dynamics 365 for Operations Blog bot DAX Blogs 0 14.03.2017 00:13
dynaxtips: D365 Operations is available on-premise! …again. Blog bot DAX Blogs 0 25.02.2017 02:19
dynaxtips: D365 Operations on a Mobile phone Blog bot DAX Blogs 0 22.12.2016 15:11
sumitsaxfactor: Replace a Financial Dimension in Default Dimensions–Condensed [AX 2012] Blog bot DAX Blogs 0 23.11.2012 23:13
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

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

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

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