return to previous edit screen

I have an edit screen that has a button that links to another edit screen. That edit screen has a button that links back to the first edit screen, but it doesn’t return to the first edit screen, it creates a new one. This makes a potentially endless chain.

We like the functionality of linking the two edit screens, but would like to avoid endless chaining.

Is there a way to always return to the previous edit screen when two edit screens are linked to each other?

Maybe I didn’t understand the problem, but if you have two screens A and B, and invoke openWindow(“B”, …) in screen A, then it is enough to invoke close() in screen B to return back to screen A.

To further clarify, the problem is simply that two screens are linked to each other. If a user follows the path of links, they can create a chain that could go several layers deep. We like the links between screens, but are looking for a simple solution to the deep chaining problem

But then screen B has a link back to screen A built into it which again links to screen B and back and forth forever, stacking up layers of screens. Hopefully users are smart enough just to close the window to move back to the previous screen and not click on the link . Nevertheless, the debuggers are complaining about the possibility. I’m sure I can figure out a work-around to please the debuggers.

I think you can pass a parameter when opening B from A. Then in the link to A handler you can just close B instead of opening A again if the parameter exists.