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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 16.11.2011, 15:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
workflowax: How do I select from table Common in AX?
Источник: http://workflowax.wordpress.com/2011...-common-in-ax/
==============

Workflow quite often uses fields such as ContextTableId and ContextRecId to reference the original document. I’ve been needing to get hold of the original database record as a Common object from which I can then do various things, but the question is how do i get that common object?

I’ve tried something like this
X++:
Common buffer;
;
select buffer where buffer.TableId == _tableId && buffer.RecId == _recId;
This however always return an empty buffer regardless of whether or not the record does exist. I eventually managed to retrieve a common record with the following method.
X++:
Common buffer;
SysDictTable dictTable;
;
dictTable = new SysDictTable(_tableId);
buffer = dictTable.makeRecord(); 
select buffer where buffer.RecId == _recId;
I’ve needed to do this a couple of times in the past and kept forgetting, so I’m posting it here for myself and who ever else wants to accomplish this. Enjoy!




Источник: http://workflowax.wordpress.com/2011...-common-in-ax/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.

Последний раз редактировалось Poleax; 16.11.2011 в 17:42. Причина: оформление
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
emeadaxsupport: New Content for Microsoft Dynamics AX 2012 : October 2011 Blog bot DAX Blogs 0 27.10.2011 17:11
axinthefield: Dynamics AX Event IDs Blog bot DAX Blogs 0 01.03.2011 22:11
daxdilip: Whats New in Dynamics AX 2012 (A brief extract from the recently held Tech Conf.) Blog bot DAX Blogs 7 31.01.2011 12:35
dynamics-ax: Official Details about Dynamics AX '6' released, including comments from Microsofts Kees Hertogh Blog bot DAX Blogs 0 11.01.2011 05:22
workflowax: How to run multiple Dyanamics AX workflow websites on IIS 7 Blog bot DAX Blogs 0 10.12.2010 18:11

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

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

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