How does Skuid persist objects to SF?

I’m writing a snippet that programmatically adds blank lines to tables (whose models are child objects) when the user tabs through the table. I have to add and remove values from the changes object, which is fine.

The code is working for modifying and deleting an object, but not for adding a new object. The new object never appears in SalesForce. I’m under the impression that Skuid persists all the changes to the requested model after calling model.save(). Furthermore, I’ve found that I need to specify the id of the parent object in the object definition of the child models being saved, but even after doing so, they still don’t appear in SalesForce. Is there something I’m missing?

Hi Robert,

Our supported way for:
 - creating new rows in Models is to use model.createRow()
 - updating existing rows is to use model.updateRow(row,field,newValue)
 - marking records for deletion is to use model.deleteRow(row)
 - commit all changes to salesforce (as you’ve seen) is model.save()

where model is an instance of a Skuid model such as is retrieved by skuid.model.getModel(modelId) and row is a data row retrieved from a model via model.getRowById(rowId) or by grabbing a row from model.data 

These methods are covered in more detail in our API docs on the skuid Model object.

Hope that helps!

Zach