Hi guys,
am going to insert bulk of records in my custom table using RecordSortedList ,,
one record is being inserted in the table instead of multiple records,
a) i created a class
b) created a method in the table
static server void insertDB()
{
RecordSortedList recordSortedList;
table1 table1;
recordSortedList = new RecordSortedList(tablenum(table1));
recordSortedList.sortOrder(fieldnum(table1,recid));
table1.clear();
table1.name="AAAA";
table1.Id = 401;
recordSortedList.ins(table1);
table1.clear();
table1.name="BBBBB";
table1.Id = 402;
recordSortedList.ins(table1);
recordSortedList.insertDatabase() ;
}
c) created a main method in class called the static method with
public static void main(Args args)
{
class1::insertDB();
}
when i checked in the table only one record (last one with id 402 ) is inserted instead of two records..
could you please let me know cause for this...