Edit Parent Record In Popup and update Child record to show Edit

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • In Progress
Hello,

Currently I have a button that opens a parent record in edit mode in a popup window where the user can make changes save and close out window without navigating away from child record.  Is there anyway to have this functionality still exist but also have it refresh the child record to show the new change on the parent level but on the child record form.  While I like the idea and functionality of the popup I would love to hear other ideas for easily editing a parent from the child record which is my basic problem I am trying to solve for.

Thanks.
Photo of Jacob

Jacob

  • 738 Points 500 badge 2x thumb
  • Need Help

Posted 1 year ago

  • 0
  • 1
Photo of Matthew Neil

Matthew Neil

  • 31,438 Points 20k badge 2x thumb
On of the issues you might run into when you refresh the child record, is it will want to save any edits, so you will want to either save the child before the pop-up is opened, or only do this from view mode.

The refresh will come with some html to to the affect of 

{if (a.closed) {window.location.reload();}},500);\"
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 26,262 Points 20k badge 2x thumb
It is not clear to me if your reference to a "popup" is a new window or a dialog.

If it is a new window you simple call the following when the new window unloads.

window.opener.location.reload();

If it is a dialog you just call the following when the dialog is dismissed:

window.reload()