Retrieve OQL query from context DataGrid

Hi all, For my project I need to be able to export data from a datagrid to XLSX. Since the standard Mendix Excel export funcionality doesn't support XLSX and returns ugly filenames, I build my own java-action for it. My export functionality works with the IDataTable object which is retrieved with an OQL query. Want I want as an input for this OQL query is the OQL query of the datagrid in which the button is placed. Does anybody now how I can retrieve the OQL query of a specific datagrid this button with java-action is placed in ?
1 answers


You could try and turn on the connectionbus retrieve logging to review the SQL statement being fired by the server and construct the OQL query from that.