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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 05.03.2010, 17:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,644 / 848 (80) +++++++
Регистрация: 28.10.2006
SysDictCoder: Comparing records
Источник: http://feedproxy.google.com/~r/sysdi...3/3IW37fNgwlQ/
==============

Sometimes you need to know what’s the difference between records. I made a simple function to do just that. It’s an example of how to use reflection and field IDs on records.

It takes two records and returns a container with the field IDs and the values from both records. For simplicity I used a flattened container instead of more complicated data structures. Feel free to replace it with nested containers or some kind of collection.

I added this to the class Global for easy access.

<div class="wp_syntax"><div class="code">public static container compareRecords(Common _record1, Common _record2){ SysDictTable dictTable = new SysDictTable(_record1.TableId); SysDictField dictField; FieldId fieldId, extFieldId; container ret; int i, j; ; if (_record1.TableId != _record2.TableId) return conNull(); for (i=1; i<span style="color: #00007f;">
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Leon's CRM Musings: Auto-assigning workflow-created records to the current user Blog bot Dynamics CRM: Blogs 0 05.02.2010 15:05
Dynamics AX Sustained Engineering: Deleted alert records are shown in the Unified Worklist web part Blog bot DAX Blogs 0 23.12.2009 03:12
Jim Wang: Show both active and inactive records in the lookup view Blog bot Dynamics CRM: Blogs 0 30.04.2009 02:08
Microsoft Dynamics CRM Team Blog: Leveraging bulk delete jobs to manage System Job log records Blog bot Dynamics CRM: Blogs 0 13.11.2008 22:06
Axapta Lessons: Merge Customer Records Blog bot DAX Blogs 0 28.10.2006 18:22

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

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

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 03:35.