Mark Delete Row using Snippet

I am using following block of code to mark rows in model for deletion.
if(delQliPri.data.length >0){
    $.each(delQliPri.data,function(i,row){
    console.log('RowID------>',row.Id);
    delQliPri.deleteRow({Id:row.Id});
    });
}
but it is doing nothing. Don't understand where it is wrong. Help me in understanding it. I tried to implement it from this Skuid document

Comments

  • edited February 2018
    I see deleteRow() but I don't see abandonAllRows()
  • edited February 2018
    Yes, I want to mark row for deletion. So on save of the model row will be deleted from Salesforce database. I believe abandonAllRows() is to remove data from model, that won't delete any data from Salesforce database.
  • edited March 2018
    Are you trying to delete all of the rows in the  model?  If so, instead of delQliPri.data, use delQliPri.getAllRows() in the each statement.  Also, call deleteRow(row), instead of {Id:row.Id}
  • edited March 2018
    Thank you Peter, this helped me.
Sign In or Register to comment.