State Considerations
In the PeopleSoft Pure Internet Architecture, all processing occurs on the server. If you do something in your PeopleCode program that causes a trip back to the user before the end of your PeopleCode program, the PeopleCode program cannot regain its state, that is, it can't reset local variables, and so on. This applies to all APIs that use the Session object.
If you must go back to the user before the end of your PeopleCode program, you must set all your objects to NULL before you go, or else you receive a runtime error.
For example, the following code causes an error:
&Session = %Session;
Rem &Session = Null;
WinMessage("Hello");The following example does not cause an error:
&Session = %Session;
&Session = Null;
WinMessage("Hello");