Refreshing of Main Search Grid after creating a new revision

Hello,

Is there a way to refresh the Main Search Grid after creating a new revision of an Item?

I have an action 'Create New Revision' which has a method On Complete which refreshes the Item. For that case I'm using 'parent.onRefresh()'. The method works properly when the Item is opened and the user clicks on the Action. But it fails when the Action is triggered from the Main Search Grid.

Parents
  • 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. 

  • I found a workaround. Not sure if this is the right way to do it but it works for now Slight smile Here is the code that I'm using now:

    const topWindow = aras.getMostTopWindowWithAras(window); 
    if (topWindow.work && topWindow.work.grid) 
    {
        main.work.searchContainer.runSearch();
    }
    else
    {
        parent.onRefresh();
    }

    Actually, the 'if' is taken from one of your projects, Angela Slight smile 

Reply
  • I found a workaround. Not sure if this is the right way to do it but it works for now Slight smile Here is the code that I'm using now:

    const topWindow = aras.getMostTopWindowWithAras(window); 
    if (topWindow.work && topWindow.work.grid) 
    {
        main.work.searchContainer.runSearch();
    }
    else
    {
        parent.onRefresh();
    }

    Actually, the 'if' is taken from one of your projects, Angela Slight smile 

Children