The reason why work queue screens are not lazy loaded is that there is an insufficient support in the model.
Currently lazy loading implemented in menus requires a List Data Structure + List Method in order to load the master list and the main data structure + single record load method in order to load the current record.
The whole definition for work queue screens comes from the Work Queue Class.
Let’s have a look at the TextFile queue class definition:
As you can see, there is only a support for loading the whole thing. As queues are always just a single entity, we are very close. We can use the same data structure for loading the list as for loading the current record. We have the list method WorkQueueStructureUserListMethod.
But we are missing the single record load method.
Fortunately each work queue data structure is required to support the following methods, identified by their names in ORIGAM code.
So we could actually use the GetById method for loading the single record. Like here:
Please note we can get into troubles when multiple checkboxes option is selected on an action button. If the list is very long (which I suppose was the reason for creating this ticket), checking all records could kill the app. We should maybe introduce some limits.
But you should also consider that row states anyway load each record in the backend. We could skip checking for row states if there are no rules whatsoever (security or formatting). Not even requesting them from the frontend.