Forum Discussion
Hi Jonatas,
I assume that you open this dialog from the "My InBasket" grid, since if you needed to navigate there after the custom dialog closes, you wouldn't need to refresh it. What worked for me in a smiliar situation is to rerun the search on the grid after your custom dialog closes:
// My dialog parameters
var param = {
aras: aras,
type: 'SearchDialog',
dialogWidth: 700,
dialogHeight: 450,
itemtypeName: 'Part',
};
// The function that runs the search after the dialog is closed.
function callback(res) {
if (res) {
var topWindow = aras.getMostTopWindowWithAras(window);
var workerFrame = topWindow.work;
if (workerFrame && workerFrame.searchContainer) {
workerFrame.searchContainer.runSearch();
}
}
}
var topWnd = aras.getMostTopWindowWithAras();
var wnd = topWnd ? topWnd : window;
var openDialog = wnd.ArasModules.MaximazableDialog.show('iframe', param);
openDialog.promise.then(callback);
This will run the search on the current grid after your custom dialog closes.
Does this help?
Cheers,
C
- Former_Member7 years agoIdeator I
Hi cogres, thanks for the answer.
The dialog opens from other item form, not from my in basket menu/grid.
This dialog has worfklow vote options, and when an user select one of these options, a method is executed completing a workflow task. The problem is, when that task is completed, my inbasket grid view is not updated, the task still remains viisible in the grid, the user must to run a search on my inbasket view to update, and then the task disapear, because is completed. I want to know if is possible to execute a search to update my inbasket grid automatically after the dialog is closed or a method is executed.
Regards,
Jonatas
- cogres7 years agoIdeator I
Hi Jonatas,
okay, I see. I would still say that something like
var topWindow = aras.getMostTopWindowWithAras(window);
var workerFrame = topWindow.work;
if (workerFrame && workerFrame.searchContainer) {
workerFrame.searchContainer.runSearch();
}is what you are looking for. You just need to identify the correct object in your setup that holds the right searchContainer and then run runSearch() on it.
Without knowing more about the exact nature of the setup, I can't say much more. How do you access the "My InBasket" grid from the "other item form"? On a relationship tab?
It is definitely possible to run a search for a grid on a relationships tab in a client side method, with similar to the above code.
Cheers,
C- Former_Member7 years agoIdeator I
I've recorded an example of the scenario, hope that help to demonstrate the problem:
https://www.youtube.com/watch?v=c0UGkl7DSYs&feature=youtu.be
Regards,
Jonatas