Dienstag, 30. August 2016

Redirect to many Home Page after Login in APEX 5.0

To redirect to Many Pages into APEX 5.0. In my Case i use the Application Express Authentication and write this Procedure in Source->PL/SQL Code. I have created 2 User in Apex. When User is admin then go to Page 2 . If not go to page 3. The below Code ilustrate that.

procedure post_authentication
l_url varchar2(255);
    if upper(:APP_USER) = 'ADMIN' then
        l_url := APEX_UTIL.PREPARE_URL(p_url => 'f?p=' || :APP_ID || ':2:'|| :APP_SESSION ||':::::');
        l_url := APEX_UTIL.PREPARE_URL(p_url => 'f?p=' || :APP_ID || ':3:'|| :APP_SESSION ||':::::');
    end if;
end post_authentication;

Then in Authentication Scheme->Login Processing->Post-Authentication Procedure Name.  i write the Name of the Procedure like the below Image

Demo Try with User admin/admin and User nonadmin/nonadmin .It works fine

Keine Kommentare:

Kommentar veröffentlichen