locked
Update Item on Browse Screen and Refresh List (HTML Client)I hav RRS feed

  • Question

  • I am using a JQM panel to display a selected item from a list on a browse screen.  After the user changes some values I want to update the selected item in the database and refresh the list.

    I can easily bind to the close event of the JQM panel to hook into a good place to do this.  From here I can then run:

    myapp.applyChanges().then(updateList(screen),function fail(e) {
    
            msls.showMessageBox(e.message, { title: e.title }).then(function () {
    
                contentItem.screen.details.dataWorkspace.ApplicationData.details.discardChanges();
    
            });
    
    });

    And in updateList:

    screen.getSearchOrders().then(function (orders) {
                orders.refresh();
    });

    When all this runs, however, the error message box is firing with the following message: "The data you are editing has been updated by another transaction. Please refresh the page and try again.".

    What is the correct way to implement this scenario (other than using a separate add/edit screen)?

    Thanks for any help,
    Richard


    • Edited by Richard MM Tuesday, August 13, 2013 12:57 AM more detail
    Tuesday, August 13, 2013 12:55 AM