To return from the EWD application to the original WLD application, you use a special EWD API method which creates a correctly tokenised WebLink URl and saves it as an EWD Session variable. For example, within a pre-page script:
s nvp="a=123&b=hello" d defineWLDURL^%zewdWLD("myWLDURL","myWLDPage",nvp,,sessid)
In the example above, an EWD Session variable named myWLDURL will be created whose value is a WLD URL that can be used to return the user to the WLD page named myWLDPage in the original WLD application. The example also demonstrates how to also pass two additional name/value pairs to the WLD page (a and b). You can pass as many name/value pairs (or none at all), but remember that when you return to the WLD page, the contents of the EWD session will have been copied to the WLD session anyway, so often it is not necessary to pass any additional name/value pairs.
Within the main body of the EWD page you can now make use of this EWD Session variable, eg: