Good afternoon. I have a question: why doesn't it work from BaseGridSectionTemplate and ListFreedomTemplate.
request.$context.executeRequest({ request: "crt.LoadDataRequest", params: { config: { loadType: "reload", useLastLoadParameters: true }, dataSourceName: dataSourceName } });
And request.$context.getPrimaryModelName() doesn't work either.
And how else can I trigger the list update event?
Thank you.
Like
Be sure to also include the context in the request. See https://customerfx.com/article/refreshing-reloading-page-or-list-data-on-a-creatio-freedom-ui-page/
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.
Eugene Demchuk,
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.