locked
Custom saveChanges Code on Button to multiple Sharepoint Datasource RRS feed

  • Question

  • Hi,

    Save changes on first instance works perfectly but on second instance without reloading the entire LightSwitch App i am not able to save the Second instance.

    Error:

    Cannot save when there are nested change sets.

    Save Button Code:

    myapp.activeDataWorkspace.ChildData.saveChanges().done(
            function () {
                myapp.activeDataWorkspace.ParentData.saveChanges().then(function () {
                    myapp.showBrowseScreen(null, {
                        beforeShown: function () { },
                        afterClosed: function (CurrentScreen, navigationAction) {
                            if (navigationAction === msls.NavigateBackAction.commit) {
                                screen.Child.details.refresh();
                            }
                        }
                    });
                });                   
            },
            function () {
            },
            function () {
            });

    Please guide me through....

    Thanks.

    Tuesday, July 1, 2014 3:43 PM