Hi team,
I have a case when after trigger record.save() on the page I want to reload the embedded details. The record is saved correctly and entered on the success method. How can force the reload of the store for the detail?
Thanks!
Like
Hello Federico,
It should be tested, but if I remember correctly if controller is used for the action the
controller.refreshDirtyData();
method can be called to force reload all details on the page. You can also find its uage in the MobileActivityGridPageControllerV2 from the Mobile package.
There is also an option that our R&D team used, the case was the following: changes were applied on the edit page and data on all previous pages should've been updated. For this purpose the following approach was used:
completeDataSaving: function(operation) { let operationConfig = this.createPageOperationConfig(operation); return Terrasoft.BaseEditPageController.superclass.completeDataSaving.apply(this, arguments).then(() => { let pageHistoryItem = this.getPageHistoryItem(); let useOptimisticEditing = this.useOptimisticEditing(); if (useOptimisticEditing) { Terrasoft.PageNavigator.refreshPreviousPages(operationConfig, pageHistoryItem); } else { Terrasoft.PageNavigator.markPreviousPagesAsDirty(operationConfig); } this.doAfterSaving(operationConfig); }); }
But this is more for the previous edit pages rather than for the current edit page. Examples of Terrasoft.PageNavigator.refreshPreviousPages() can be found in base-edit-page-controller.js and in the base-preview-page-controller.js