1
votes

Trying to replicate some of the functions of the Project Tracker template, so I am using a Datasource in Manual Save Mode.

When I try to create a new item I get the following error:

Cannot create a new record on a datasource in manual save mode with pending changes.

I tried creating a button and clicking "widget.datasource.clearChanges();" but that doesn't seem to help.

I am not sure how to clear the pending changes. Any help would be greatly appreciated.

1

1 Answers

1
votes

I think I have figured it out/figured out a work around.

I adjusted all my buttons (ex: my Add Item button, my Delete button, etc.) by adding "widget.datasource.saveChanges();" to them. So now it looks like this:

widget.datasource.saveChanges(); 
app.showDialog(app.pageFragments.Add);

And this:

widget.datasource.saveChanges();
app.closeDialog();