You can use the following method to insert records into the data input storage: DataInputService.insertDataStorageRecord Method
The following sample is using this exact method:
Data Input Sample
Specifically, you can see the script used under this sample here (note the bold line is where the insert takes place):
var recordId = dataLabel1.metricSetBindings[0].dataResult.cellset.rows[0].members[2].caption;
var customerId = dataLabel1.metricSetBindings[0].dataResult.cellset.rows[0].members[0].caption;
var selectedAction = ‘’;
for (i=0;i<dropDownList1.items.length;i++)
{
if (dropDownList1.items[i].isSelected)
{
selectedAction = dropDownList1.items[i]._caption;
}
}
var inputService = dundas.context.getService(“DataInputService”);
var del = inputService.deleteDataStorageRecord(“041163cf-c162-49df-b4e6-89293897f2d7”, “9049c9ed-6f1c-4d50-b664-6b919ecba836”, recordId);
del.done(function (message) {
var def = inputService.insertDataStorageRecord(“041163cf-c162-49df-b4e6-89293897f2d7”, “9049c9ed-6f1c-4d50-b664-6b919ecba836”, [selectedAction, customerId]);
def.done(function (message) {
// reload the scorecard
this.parentView.reset();
}.bind(this));
}.bind(this));