I typically use this jquery when function. Also, you’d need to do set a deferred promise if there other actions following this in an action framework.
var model = arguments[0].model, row = arguments[0].row, $ = skuid.$; var mA = skuid.$M('AllAppointments'); mA.createRow({additionalConditions:[ {field: 'Start__c', value: row.Start__c}, {field: 'End__c', value: row.End__c}, {field: 'Room__c', value: row.Room__c} ]}); model.deleteRow(row); $.when(mA.save()) .done(function(){ mA.setCondition(mA.getConditionByName('ThisOne'), mA.getFirstRow().Id); mA.updateData(); }) .fail(function(){ console.log('Something went wrong querying ProposalLineItemForCurrentTask model.'); dfdTask.reject(); });<br />