In this case you want to use the foundset object:
foundset.newRecord();Now that's all find and good - the record will be created and the user interface won't immediately change (until you call databaseManager.saveData()). This method is much faster when you're creating a bunch of records (or related records).
foundset.myField = "value";
Now, something that I use when I'm using the second method is to grab a record object reference when I create the record - so I can choose to commit that newly created record right away. Here's the slightly modified code:
var record = foundset.getRecord(foundset.newRecord());Because we have a reference to the foundset record in the variable called "record" - we can tell the databaseManager to only save that one record (rather than all outstanding changes).
record.myField = "value";