Forum Discussion
The art of proper refreshing item is hard to master. Some questions first:
Do you use a client or server Method or both combined?
Do you use an Action or a CUI element?
Do you return the new revisioned item in your Method? That normally does the trick for server Method.
- little_legend4 years agoCreator II
I found a workaround. Not sure if this is the right way to do it but it works for now [emoticon:c4563cd7d5574777a71c318021cbbcc8] Here is the code that I'm using now:
[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:650be1a9-3895-4c92-a44e-6a569c0722ce:type=javascript&text=const%20topWindow%20%3D%20aras.getMostTopWindowWithAras%28window%29%3B%20%0D%0Aif%20%28topWindow.work%20%26%26%20topWindow.work.grid%29%20%0D%0A%7B%0D%0A%20%20%20%20main.work.searchContainer.runSearch%28%29%3B%0D%0A%7D%0D%0Aelse%0D%0A%7B%0D%0A%20%20%20%20parent.onRefresh%28%29%3B%0D%0A%7D]Actually, the 'if' is taken from one of your projects, Angela [emoticon:c4563cd7d5574777a71c318021cbbcc8]
- angela4 years agoCatalyst II
Ahh the runSearch trick. [emoticon:6d505171faa4497c85c5ca27290c555d] I somehow like the fact that partners sometimes use my most shady workarounds for premium customer projects. [emoticon:0f36700dfeb3494fa10d47dd9e1f90a1]
You´re invited to test out this one and let me know the result.
if (window.isItemsGrid) {
window.updateRow(aras.getItemById(options.itemTypeName, itemID, 0));
}I haven´t tested this one yet case I didn´t had a proper use case yet.
- little_legend4 years agoCreator II
I will test it, thank you [emoticon:c4563cd7d5574777a71c318021cbbcc8]
- little_legend4 years agoCreator II
The main method is a server-side, the method On Complete is a client-side.
I'm using an Action.
The server-side method returns the new revisioned item but sometimes it doesn't work properly and the item is not 'refreshed' somehow.