[duplicated from the Apex Slack channel, because no one responded]
I'm trying to hide the Filters option from my IG Actions menu (long story, don't ask).I tried using the method that John Snyders provided in his handy post Hack IG - Part 2, of using the Initialization Javascript Function setting (aka Configuration). I've tried in both Apex 19.2 and 22.2, but I can't get it to hide the Filters option, though I can hide the Columns or the Data->Aggregate menu options. My attempt:
function(config) {
config.initActions = function( actions ) {
actions.hide("show-aggregate-dialog"); // this works
actions.hide("show-filter-dialog"); // this does not hide Filters
actions.lookup("show-filter-dialog").hide = true; // this doesn't work either
}
return config;
}
Playing in the browser console, the other way I found to hide Filters is with this API hack:
apex.region("emp").widget().interactiveGrid("getActions").lookup("show-filter-dialog").hide = true
This hack above works in both Apex 19.2 and 22.2.
In Apex 22.2, you can run it from the Page Load event
In Apex 19.2, I only got this to work by the Interactive Grid->Report Change event
But I'd rather use the "official" (semi-supported) method, rather than put the above in an OnLoad Javascript DA.
Where am I going wrong here?
Thanks in Advance