How long have you been using Microsoft Dynamics Ax?

Toplam Sayfa Görüntüleme Sayısı

Popular Posts

Translate

Bu Blogda Ara

28 Mayıs 2012 Pazartesi

Working with RecordInsertList / RecordInsertList ile çalışmak


Hi,

When we need to insert multiple records to the database in one trip, for performance or something else we sholud use RecordInsertList class.

In example below we declare a RecordInsertList variable with table number and use add() method to add new record to the array list by using tableVariable.

After we finisheded to add new records to the RecordInsertList we call insertDatabase() method to insert record list to the database with one trip.

Have a nice coding,
Alper.

-------------------------------------

RecordInsertList ril = new RecordInsertList(tablenum(TableName));
TableName tableVariable;
;
tableVariable.field1 = "abc";
tableVariable.field2 = 123;
ril.add(tableVariable);
ril.insertDatabase();

-------------------------------------

Merhabalar,

RecordInsertList sınıfını çoklu kayıt girişlerinde her seferinde veri tabanına gidip gelinmesinin önüne geçmek ve performans kazanmak için bir liste oluşturmak için kullanıyoruz.

Bu liste sayesinde kayıtlarımızı add methodu ile listeye ekliyor ve işlemler bittikten sonra insertDatabase ile tek seferde sunucuya gönderebiliyoruz.

Bol AX' lı günler
Alper.




Hiç yorum yok:

Yorum Gönder