Oracle Apex - Get numeric user id
APEX version 21.1
Often you need numeric user id to insert in the database table to identify the user created or updated the record.
Often you need numeric user id to insert in the database table to identify the user created or updated the record.
Getting it very simple in Oracle Apex using APEX_UTIL.GET_CURRENT_USER_ID. Our requirement was to it in our application and use it throughout the session in various database transactions. Believe it is just a 3 line code. following are the steps.
1. create a Application Item (P_AI_USER_ID) using shared component
2. Go to Login form
3. Create a process at Processing level with Execute Code >> PL/SQL add following code
Begin
:P_AI_USER_ID:=APEX_UTIL.GET_CURRENT_USER_ID;
End;
4. Save the page.
Thats it....
Code Smartly with Low Code Oracle APEX
- administrator's blog
- Log in to post comments