On a page that displays record details for editing, I have a button to delete the current record.
The button shows a reusable popup that asks for confirmation to delete the record.
Clicking Delete it causes the popup to delete the current record. Keep It or escape or clicking away from the popup causes the record to be retained.
If the record is retained, the popup closes and the record detail page remains active.
If the record is deleted, the record detail page should go back to the previous page.
Unfortunately, the record detail page doesn’t know what the popup did. It simply showed the popup and its workflow ended. It doesn’t know whether or not it should go back to the previous page.
Being a reusable element, the popoup cannot know what to do because it doesn’t know what the page that showed it would want done after the record is deleted.
Is there any way the popup can trigger a workflow on the invoking page and communicate that it deleted the record so the page knows what to do?