Open a popup window from inside Record A and stay on the record after saving Record B

Open a popup window from inside Record A and stay on the record after saving Record B

Hello community,

Perhaps you can help me with the following topic.

I have a form A with a decision box.
When this decision box is checked, a form B pops up.
Once Form B is saved, I need to stay on Form A to continue entering data.

I've observed the following cases using the "openUrl("#Script:dialog.close","same window"); functionality :

- When I create Record A using the "+" (specific menu tab for adding a record), everything works as expected, and when I save Form B, it closes, allowing me to continue entering data in Form A.

- When I create Record A using the "+" in the report, when I save Form B, it closes but also closes Form A  and I come back to the report (not staying on the Record A).

- When I create Record A using the "+" in the report embedded in a page, when I save Form B, it closes but also closes Form A and I come back to the report embedded in the page (not staying on the Record A).

I tried placing the code in "On Create - On Successful Submission", "On Edit - On Successful Submission", and "On Create or Edit - On Successful Submission" separately.
I also tested with "openUrl("#Script:dialog.close","parent window");:
I still see the same behavior in several applications.

Could someone help me understand why the behavior of the openUrl functionality differs depending on where the record comes from and/or whether it is created or edited and how to get a behavior regardless of the action (Create or Edit) and/or the location from which the Record is created?

I admit that I don't understand.