How can I automatically launch a function when user enters a Resource list page?
I need to update some data before users access the mediaResource list page (table).
What would be a correct approach to automatically launch the function I need as soon as user enters that url (https://apps.geslem.com/media) ?
For the moment, I have put a button that users have to click to run the funcion:
Any ideas, please?
Tks in advance.
2 Replies
Perhaps via the mount function on the Listmyresource class. But that's seems like an atypical approach (changing all the records before accessing them in the index list)
Yes, I know it is a "horrible" provisional solution till I can find when the error happens. It has to be launched through serveral observers but not all of them are launching the function correctly and I have to investigate a bit more to find the error.
Thanks for your approach.
I put the function inside the table function (which is always called when you go to the listMyResource) and it is working fine:
Thanks for your help.