I’m trying to extend the Query Report js class with some additional controls, I have it mostly working with composition but refreshing and reloading isn’t quite working properly. I really need to override some class methods using inheritance, but I’m struggling to replace the query-report object with my own. I’ve tried the below in my report js file (after declaring the extended class) but it doesn’t call my show() I suspect because the query_report.js content is loaded later. Any ideas please?
You need to read about monkey patching and then do your research until the above code makes sense. It’s all there.
Essentially what the above code does is save off references to existing framework methods so they can be called later and then replace them with local ones with additional functionality.
Use as a last resort. If you’re adding long-term functionality you should look at adding a hook into the framework.