|
21.12.2007, 04:11 | #1 |
Участник
|
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, напишите личное сообщение администратору. |
|