Skip to content

Instantly share code, notes, and snippets.

@andyhuey
Created October 10, 2014 23:11
Show Gist options
  • Save andyhuey/84495f8a3480d2df31f9 to your computer and use it in GitHub Desktop.
Save andyhuey/84495f8a3480d2df31f9 to your computer and use it in GitHub Desktop.
RecordSortedList test
static void AjhTestRSL(Args _args)
{
CustTable custTable;
RecordSortedList myList = new RecordSortedList(tableNum(CustTable));
boolean moreRecs;
myList.sortOrder(fieldNum(CustTable, AccountNum));
// create a list
while select firstOnly10 * from custTable
{
myList.ins(custTable);
}
// step through the list
moreRecs = myList.first(custTable);
while (moreRecs)
{
info(custTable.AccountNum);
moreRecs = myList.next(custTable);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment