Understanding Page Class
Use the page class to manipulate a page in a component. The most common use of this class is to hide or display a page in a component, either based on field values or the level of security of the user.
Generally, the PeopleCode used to manipulate a page object is associated with PeopleCode in the Activate event.
Note: The page object should not be used until after the page processor has loaded the page: do not instantiate this object in RowInit PeopleCode, use it in PreBuild, PostBuild or Activate instead.
In addition, if you need to hide the current page, PeopleSoft recommends using the PreBuild event for your program.