Saving Records Using the DataSource

To save an updated record from an edit form, you can pass it to the DataSource JS object:

var record = this.requestForm.getRecord();
this.requestDataSource. saveRecord (record);


The DataSource will automatically convert record values to the Archibus neutral format used to send the data to the server.

You can also save a record created programmatically:

var record = new Ab.data.Record({
'wr.status': 'Created',
'wr.requestor': View.user.name},
true); // true means new record
this.requestDataSource. saveRecord (record);