locked
LS HTML: refresh screen after logical deleting RRS feed

  • Question

  • Hello,

    I fave a Browse screen with some commands.

    The command delete opens a popup and ask the user for deleting the selected record.

    On 'OK' button, I set the flag 'IsDeleted' to true (logical deletion);

    The browse screen is based on a query that returns only the instances with IsDeleted = false;

    I woul'd like to refresh the screen after cliking OK on the popup, but it doesn't work..

    Here's my code...someon has the same issue?

    myapp.BrowseRichiedenti.OK_execute = function (screen) {
        //screen.Richiedenti.selectedItem.deleteEntity();
        // Cancellazione logica
        screen.Richiedenti.selectedItem.IsDeleted = true;
        myapp.applyChanges();
        screen.Richiedenti.load();
        screen.closePopup();
    };

    Friday, November 29, 2013 10:52 AM

Answers

  • OK, I found the answer..have to wait that all changed ar applied thanks the promise object:

    myapp.BrowseEsercizi.OK_execute = function (screen) {
        // Write code here.
        //screen.Richiedenti.selectedItem.deleteEntity();
        // Cancellazione logica
        screen.Esercizi.selectedItem.IsDeleted = true;
        myapp.applyChanges().then(function () {
            screen.Esercizi.load();
        });
        screen.closePopup();
    };

    • Proposed as answer by Xpert360 Friday, November 29, 2013 2:29 PM
    • Marked as answer by Angie Xu Monday, December 2, 2013 6:24 AM
    Friday, November 29, 2013 11:01 AM

All replies

  • OK, I found the answer..have to wait that all changed ar applied thanks the promise object:

    myapp.BrowseEsercizi.OK_execute = function (screen) {
        // Write code here.
        //screen.Richiedenti.selectedItem.deleteEntity();
        // Cancellazione logica
        screen.Esercizi.selectedItem.IsDeleted = true;
        myapp.applyChanges().then(function () {
            screen.Esercizi.load();
        });
        screen.closePopup();
    };

    • Proposed as answer by Xpert360 Friday, November 29, 2013 2:29 PM
    • Marked as answer by Angie Xu Monday, December 2, 2013 6:24 AM
    Friday, November 29, 2013 11:01 AM
  • Thanks for coming back with the answer!

    Best regards

    Angie


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, December 2, 2013 6:24 AM