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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 17.10.2018, 18:12   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
How to get all related table ids from code
Источник: http://alexvoy.blogspot.com/2018/10/...-ids-from.html
==============

<div dir="ltr" style="text-align: left;" trbidi="on">We can loop all relations on a table by code.


<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">static void wzhGetRelatedTableNames(Args _args)
{
wblInExtCodeValueTable wblInExtCodeValueTable;
int mapId;
TableName relatedTableName;
TableId relatedTableId;
Set tablesIdsSet = new Set(Types::Integer);
Set tablesNamesSet = new Set(Types::String);
TableId tableId = tableName2id(tableStr(wblInExtCodeValueTable));
Dictionary dictionary = new Dictionary();
SysDictTable dictTable = dictionary.tableObject(tableId);
DictRelation dictRelation = new DictRelation(wblInExtCodeValueTable.TableId);
int mapCnt = dictTable.relationCnt();
container ret ;
str relationName;
//create a maps of literals for all tables from the table relations
// so that we could get tables names based on their ids
// and if any new relation will be added to multiple external codes table
// it is present automatically in this view
for (mapId=1; mapId
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
newdynamicsax: How do I access an extended table field from C#? Blog bot DAX Blogs 0 29.04.2016 02:18
fatihdemirci: How to get table field properties from X++ Blog bot DAX Blogs 0 26.12.2015 12:15
Pawan's Ax blog: How To Iterate all the fields of a table in Ax2012 using x++ code. Blog bot DAX Blogs 0 02.01.2014 22:11
daxmusings: Get Infolog details from code Blog bot DAX Blogs 0 21.10.2011 11:11
jerry-dynamics: How can you make sure that the end user can not delete a record in one table if there are related records in another table? Blog bot DAX Blogs 0 16.06.2007 11:20
Опции темы Поиск в этой теме
Поиск в этой теме:

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

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

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

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