Method Community

 

Refresh grid after popup closes

Last post 10-09-2013 9:20 AM by Method_Adam. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 02-18-2013 3:17 PM

    Refresh grid after popup closes

    I have a grid on a main parent screen. To edit/add records for that grid, there is a button that opens a popup screen.

    When I close the popup, I want to refresh a grid in a tabbed section of the main parent screen,

    so the user doesn't have to manually refresh the grid.

    Is there a way to do this?  I know there's a refresh grid action, but I don't know where this can be triggered.

    Thanks.

  • 02-18-2013 6:09 PM In reply to

    Re: Refresh grid after popup closes

    Answer

    Hi jpfiester,

    You can use the OnClosePopUp event on the main parent screen for the refresh grid action.

    - Adam

    Adam Lyons
    Manager of Support
    Method Integration
    a.lyons@method.me
  • 10-05-2013 10:24 PM In reply to

    Re: Refresh grid after popup closes

    I am attempting to do the same, and it's not working. I am building a process on the sales order page for order processing, and a custom grid filter to display orders ready to ship. Select the sales order, convert to invoice, all works as expected but I would like to have the sales order list grid refresh when the CreateInvoice popup is closed.

    I set the advanced screen property for onClosePopUp (already existed on SalesOrder page) to refresh the grid by default with a little logic. Nothing. Removed the logic and set the grid refresh action to #1 in the action set. Still nothing.

    Any ideas?

  • 10-07-2013 10:29 AM In reply to

    Re: Refresh grid after popup closes

    Hi Charles,

    I believe the action is working, however depending on what you're tyring to see, the value may not updating just yet.  For instance, in my example, I added the IsFullyInvoiced field to the Existing Sales Oders grid. The grid does update, however that field in particular will update after the invoice is sent to QuickBooks and QuickBooks sends information back and updates that field.  This may take 5 to 10 seconds to update.  The refresh grid action (action 12 in the OnClosePopup event) is completing before that field is updating, which is why you don't see any change.  In my example, if you click the refresh button on the grid a few more times, that field will update.

    Would your scenario be similar to this one? Might it be waiting for QuickBooks to update, and therefore not showing a change?  There are some fields that Method lets QuickBooks handle as far as updating. With these fields, Method will send the information to QuickBooks and let QuickBooks update field like IsFullyInvoiced or the RefNumber fields.  This information needs to be sent back to Method.  This process is likely taking longer than the actions in Method are taking to complete.  This is likely why you are not seeing any changes.

    - Adam

    Adam Lyons
    Manager of Support
    Method Integration
    a.lyons@method.me
  • 10-07-2013 5:01 PM In reply to

    Re: Refresh grid after popup closes

    Adam,

    I thought that might be the case originally, but it couldn't be... I realize the QB needs to do some math on the qty invoiced and other similar fields, but the filter in question is a custom field that is being updated with a TABLE UPDATE statement prior to closing the popup. If I hit the refresh button on the grid itself IMMEDIATELY after closing the popup, it filters the data correctly, but only if I click it manually. I realize this is a small issue, but it does in fact appear that the grid refresh is not happening for some reason.

    Thoughts?

  • 10-08-2013 9:47 AM In reply to

    Re: Refresh grid after popup closes

    Hi Charles,

    I took a closer look and the Refresh Grid action already in there is based an a conditional statement that it will refresh the grid only if EditEntity is the last popup called.  Since you are using the Invoice popup, this refresh is not being called.  Have you tried putting the refresh grid action as the last action in the action set?

    - Adam

    Adam Lyons
    Manager of Support
    Method Integration
    a.lyons@method.me
  • 10-08-2013 1:58 PM In reply to

    Re: Refresh grid after popup closes

    Yes, I saw that but added a new action--first tried as the first in the action set, and as the last one as well. It just doesn't seem to be running for one reason or another.

  • 10-09-2013 9:20 AM In reply to

    Re: Refresh grid after popup closes

    Hi Charles,

    Can you email me the screen this is happening on?  The only other thing I can think of is that you may have selected the wrong grid.

    - Adam

    Adam Lyons
    Manager of Support
    Method Integration
    a.lyons@method.me
Page 1 of 1 (8 items)