
Hi, everybody.
when using an AXBoundfield in a grid, f.i. a field based on ProjId, the standard lookup calls the SysDataSetLookup class. In the used dataset you can overwite the lookup method by adding the 'dataSetLookup' method to the fields methods. The SysDataSetLookup class is used as an input variable for this method. In this method you can alter/overwrite the used query. (adding ranges, etc).
We have a problem when the lookup table (projTable in our case) contains a lot of records. Over 100.000 projects.
When using the lookup button it takes a long time to display the projects. When selecting a project from the list and use the 'OK' button it again takes a long time (showing the GreenCircle avi) before we return to the EP page.
Investigating the problem, i found that the SysDataSetLookup passed thru to the dataSetLookup method already contains the complete executed query. Thus all the records in the ProjTable.
Measured by getting the query and counting the records in it.
We overwrite the method because we want to filter on the projects, using the standard validations.
The SysDataSetLookup class is getting a dataset called lookup624, which is the tableid of the ProjTable. The SysDataSetLookup class construct method is called everytime an action is done in the lookup form. going to the next page or using the OK Button. The dataSetLookup method everytime gets the complete query. Despite of overwriting it the first time and showing f.i. only 4 projects.
I could not find X++ code where AX builds and executes the query for the lookup624 dataset, so i asume that it is done within the kernel.
Question:
Is there any way AX NOT to build and execute the query ? Because i want to build the query myself, setting up ranges, adding other datasources, etc, resulting in only 4 projects. Every time the user uses the lookup button and from that point uses the next page or the OK button. (with only 4 records instead of 100.000)
Kind regards,
Peter Fokker
Pylades.
*This post is locked for comments
I have the same question (0)