I added a custom button in the detail view of an entity, which works as expected. I would like to refresh the page after the button finishes processing, but I can't figure out how to do that. I'm using this documentation.
Here is my code:
I added "this.view.reRender(true)" to refresh the page, but it doesn't work in list of detail view. Any ideas?
Here is my code:
HTML Code:
define('custom:send-message', ['action-handler'], function (Dep) {
return Dep.extend({
actionSendMessage: function (data, e) {
this.view.notify("Sending...");
Espo.Ajax.postRequest('MessageC/action/Send', {
ids: [this.view.model.id],
}).then(() => {
Espo.Ui.success('Done');
this.view.reRender(true);
});
},
initSendMessage: function () {
if(this.view.model.get('status') !== "Waiting") {
this.view.hideHeaderActionItem('sendMessage');
}
},
});
});
I added "this.view.reRender(true)" to refresh the page, but it doesn't work in list of detail view. Any ideas?

Comment