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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 21.12.2007, 04:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,487 / 846 (79) +++++++
Регистрация: 28.10.2006
axStart: RecordSortedList
Источник: http://axstart.spaces.live.com/Blog/...C0A0!209.entry
==============


The recordSortedList is an object that can be used to minimize communication to the database. His cousin is the recordInsertList, but this one has not the ability to check if the record is already in the list. How does this class work? First you have to construct the object:
RecordSortedList    rsl = new RecordSortedList(tablenum(custtable));

The next step is that you have to add the sortOrder. This sortorder is used to determine if the record is already in the list. In case of the CustTable we should enter this sortOrder, because the accountnum is the primary key index.
rsl.sortOrder(fieldnum(custTable,accountnum)); 
Next we gone create the new custTable records. This insert will not result in database travel.
ct.AccountNum = '123';
rsl.ins(ct,false); //option false do not update if the record already exist. 
Finally when we have created all records, we dump the new records in the database
rsl.insertDatabase();

It does not matter if we use flags like skipdataMethods on the records that we place in this list. They are still executed. I don’t know if this is a bug in AX.  There is also a check in AX that checks if the code is running on the Server. If this is not the case AX will prompt with an error.


Источник: http://axstart.spaces.live.com/Blog/...C0A0!209.entry
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
axStart: Video Conversations with MVPs - Dick Wenning Blog bot DAX Blogs 0 15.12.2008 18:05
axStart: Get your forms back in one workspace Blog bot DAX Blogs 0 10.12.2008 14:05
Как узнать по объекту RecordSortedList, из какой таблицы в нем записи? gl00mie DAX: Программирование 4 20.02.2008 15:39

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

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

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