Refresh detail view after edit child in lookup

The recommended method of customizing your AppGini-generated application is through hooks. But sometimes you might need to add functionality not accessible through hooks. You can discuss this here.
Post Reply
pfrumkin
Veteran Member
Posts: 157
Joined: 2020-02-18 17:58
Location: Albuquerque, New Mexico USA

Refresh detail view after edit child in lookup

Post by pfrumkin » 2020-06-29 18:44

Sorry about the long title, still not sure it's clear. I have a detail view form with a lookup to select (what I'm calling) child records of another table. I have some fields (read only) on this parent detail view from the selected child record. The lookup has options to view/edit or add records. If I click to edit a child record and change one of those fields that is displayed on the parent form, how can I get the parent detail view to refresh and show the updated value?

One obvious thing that works is to select another record in the lookup, then comeback to the original record. That works. I would like it to update when I click Save then Back after editing the child record. This really feels like an ajax thing but I'm not proficient at that enough to know for sure. I'm hoping there is a jquery thing to add in the parent-dv.js file.

Thanks.

~Paul

AppGini 5.82 Revision 1101

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Refresh detail view after edit child in lookup

Post by pbottcher » 2020-06-29 21:01

Hi,

maybe this gives you a starting point

viewtopic.php?t=3491#p12543
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

pfrumkin
Veteran Member
Posts: 157
Joined: 2020-02-18 17:58
Location: Albuquerque, New Mexico USA

Re: Refresh detail view after edit child in lookup

Post by pfrumkin » 2020-06-30 21:31

Yes looks like it will, thanks! I will try to apply in the next couple of days.

pfrumkin
Veteran Member
Posts: 157
Joined: 2020-02-18 17:58
Location: Albuquerque, New Mexico USA

Re: Refresh detail view after edit child in lookup

Post by pfrumkin » 2020-07-05 20:24

Sorry, this turned out to be a dead end. The issue is, after clicking the Back button to return to the original DV, the cache does not refresh with the changes I just made. I think i need a way to force a cache refresh when returning from the child from (after clicking the Back button).

Anyone know how to detect that we have "come from" a Back button click? Maybe we have to set a session variable on that child form, check it on the parent form and refresh?

Thanks!

Post Reply