Also, last I tried this all worked for me (but I've not re-tested in recent versions). Only reason I can think of why request.$context.getPrimaryModelName() wouldn't work is if possibly was called in crt.HandleViewModelInitRequest?
Thanks for the answer But nothing works with BaseGridSectionTemplate and ListFreedomTemplate. In the end I look for RefreshButton on the page and click it programmatically if found.
More precisely, request.$context.executeRequest did not work with BaseGridSectionTemplate, and in ListFreedomTemplate it was enough to add $context: request.$context. But request.$context.getPrimaryModelName() does not work in any of the above modules. Thanks.
For list pages, they don't have a primary datasource like an edit page does, so it would make sense that request.$context.getPrimaryModelName() doens't work on a list page.