Problem with list refresh after adding or editing

Hello

The system is in RS8.2.3 in NodeJS/Quasar. The problem is that it doesn’t refresh the listings after adding or editing a record using modal windows. Does not refresh when data is from related tables using JOIN or data in Record Detail Page.

I create a record


but when I save it I don’t update the list

This also occurs with fields added using JOIN.
It is solved if I use load() calling it from a button.

But I need it to refresh after adding a record. It also happens to me if I edit a record.
Is there a way to fix it?

I have tried to add an event after opening the editing window, but I have not been able to get it to work.
Something like this:

openDialog(rowId) {
app.openPageDialog({
page: ‘services/editchangestatus’,
url: /services/editchangestatus/${rowId},
closeBtn: true
});

// Listen for the dialog close event
document.addEventListener('dialogClosed', handleDialogClose);

}

function handleDialogClose(event) {
if (event.detail.page === ‘services/editchangestatus’) {
this.myFunctionAfterDialogClose();
// After handling the closure, you can also remove the event listener if necessary.
document.removeEventListener(‘dialogClosed’, this.handleDialogClose);
}
}

function myFunctionAfterDialogClose() {
// Your logic here
console.log(‘Dialog closed and function executed.’);
}

any ideas?

Thanks

There was an error in my code. The problem can be solved by creating an event on save and listening for the event on closing the modal window.

1 Like

Buenos dias bro

Crees que me puedas ayudar con esto?, estoy teniendo el mismo problema y vi tu post, sin embargo no logro encontrar la solucion

Buen dia Mariano

Lo resolvi con un evento.

En el archivo List.vue, luego del link que abre add.vue hace falta agregar el evento
document.addEventListener(‘dialogClosed’, actualizarGrilla);
y agregar la funcion actualizarGrilla
function actualizarGrilla() {
load();
}
En add.vue, en afterSubmit debajo de
app.closeDialogs();
agregar:
document.dispatchEvent(new Event(‘dialogClosed’));

Con esto te actualiza la grilla al cerrar la ventana.

Saludos

1 Like

Muchisimas gracias funciono exactamente como lo mencionaste