Requirements:
To create a custom Web Form that provides the user information who is logged in to that session.
Solution:
In this, we will fetch the user information from the AU_USERS table of Backend database. We will fetch UserName, Role of the user and User ID from the database. We can achieve this requirement by creating a Web form (RichForm) and using the following details:-
1. UserName like admin etc. which you can fetch using below script:-
var username=window.parent.parent.username;
document.getElementsByName('UserName')[0].value=username;
2. Role - The user can be Sysadmin, Developer, Business User etc. We can fetch as:-
document.getElementsByName('Role')[0].value=window.parent.parent.userTypeFlag;
3. User ID- Unique ID with which the user is stored in the AU_Users table of the database.
document.getElementsByName('UserID')[0].value=window.parent.parent.loggedInUserId;
We need to write all these codes in the <script> tag. Refer the screenshot and attached zip file that contains web forms for the user information.
Comments
0 comments
Article is closed for comments.