0
여기 내 상세 페이지에 내 삭제 코드 :세부 정보 페이지에서 삭제 한 후 목록 페이지로 다시 이동하려면 어떻게해야합니까?
/// <reference path="~/GeneratedArtifacts/viewModel.js" />
myapp.ViewReceipt.DeleteReceipt_execute = function (screen) {
msls.showMessageBox("Are you sure you want to delete this record?", {
title: "Confirm Delete",
buttons: msls.MessageBoxButtons.okCancel
})
.then(function (result) {
if (result === msls.MessageBoxResult.ok) {
screen.getReceipt().then(function (receipt) {
receipt.deleteEntity();
//Save changes
myapp.applyChanges().then(null, function fail(e) {
// If error occurs, show the error.
msls.showMessageBox(e.message, { title: e.title }).then(function() {
// Discard Changes
screen.details.dataWorkspace.ApplicationData
.details.discardChanges();
});
});
//navigate back to list page
this.window.location.href = '#/BrowseReceipts.lsml'; //this doesn't work for me
});
}
});
};