SugarCRM 7.x How to refresh a dashlet programmatically

Hello everyone, I'm used to search answers on this forum for a while, but for once, I have to ask my own question :)

On sugarcrm 7.6, I made a completely new dashlet, It was difficult but I did it.
Now I need to add a button in the dashlet to refresh it's content.

I guess I can use the loadData method embeded in the myDashlet.js file but how to ?

I tried to something in javascript with
App.***
But I'm not successful :(

Additionnaly, I would like to automatically set filter when I clicked on this button and before refreshing. Any idea ?
Parents Reply
  • Hi David,

    As per my understanding you have added one custom button in the hbs template for the dashlet.Now you want to refresh the dashlet when user click on that button, right?

    If so, you can define a function for the click event of the button in dashlet controller and define the function in the same controller.And you will be able to use this.render() inside the function to refresh the dashlet.

    Would it be possible to paste your dashlet controller code here?

    Thanks!
Children
No Data