---
title: "Comment by A Freeman on \"Securely Open an APEX Modal from  JavaScript\" | Hashnode"
description: "This is very helpful, thank you. Let say a duplicate is found, I would like to populate the calling form with those values? Since you cannot 'redirect' back to"
url: "https://hashnode.com/posts/securely-open-modal-using-javascript/684198026ec85f1173910cca/comment/692477c4ed9f9ccc04acf9b9"
---

[Discussion](https://hashnode.com/posts/securely-open-modal-using-javascript/684198026ec85f1173910cca)

Comment [Securely Open an APEX Modal from JavaScript](https://hashnode.com/posts/securely-open-modal-using-javascript/684198026ec85f1173910cca)

[A Freeman](https://hashnode.com/@afreeman)

[Nov 24, 2025](https://hashnode.com/posts/securely-open-modal-using-javascript/684198026ec85f1173910cca/comment/692477c4ed9f9ccc04acf9b9)

This is very helpful, thank you. Let say a duplicate is found, I would like to populate the calling form with those values? Since you cannot 'redirect' back to the calling page and Close would simply close the modal window, how would you fetch the existing fields on the underlying modal?
