Skip to main content

Change default (first) page in APEX

Having seen this question often (yesterday again in the OTN APEX forum) and having had the same problem when I first started with APEX, I thought to blog about it.


When you make your first application in APEX you typically have as default page 1 or the login page (101). If you want to change your default (first) page you need to have a look at three different places. Let's say we want to have page 9 as default page:

1) Application Builder > Your Application > Page 101 > Processes (Page Processing) > Login
Change Process to:
wwv_flow_custom_auth_std.login(
   P_UNAME       => :P101_USERNAME,
   P_PASSWORD    => :P101_PASSWORD,
   P_SESSION_ID  => v('APP_SESSION'),
   P_FLOW_PAGE   => :APP_ID||':9'
   );
Whenever somebody logs in we want him to go to page 9.

2) Shared Components > Security > Authentication Schemes > Your Authentication
Change the Logout URL: wwv_flow_custom_auth_std.logout?p_this_flow=&APP_ID.&p_next_flow_page_sess=&APP_ID.:9

If somebody logged out, we set the default page to 9 as that's our default page.

3) Shared Components > Security > Edit Security Attributes
Change the Home Link to: f?p=&APP_ID.:9:&SESSION.

If no page is specified this is the page to go to for ex. f?p=100 means we're going to application 100 with as default page, the page specified in the Home Link. You can also reference this url by #HOME_LINK#

Comments

  1. Shared Components > Security > Edit Security Attributes
    Change the Home Link to: f?p=&APP_ID.:9:&SESSION.
    Not finding Home Link option

    ReplyDelete

Post a Comment