Code to Retrieve Logged in User Details. Print
Modified on: Wed, 29 Aug, 2012 at 6:46 PM
The below attached code will help you to Retrieve the Logged in User Details.
Code Brief Explanation:
1) The Javascript code will send the session ID to an ASPX Page.
2) The ASPX page will get the User Detail using 'obj_loggedinuser' and bind it to an XML.
3) The Javascript will Parse the XML and will get the Data.
For Workflow:
In workflow Custom script(Pre-script,Post-script...) itself we can get the user details.
Code:
The code will be auto-generated in the workflow custom script.
Examples:
To get Loggedin User Name:
document.forms["employeedetails"].elements["emp_name"].value=document.currentworkitem.forms["participant"].items["0"].elements["fullname"].value
To get Loggedin User Role:
document.forms["employeedetails"].elements["emp_name"].value=document.currentworkitem.forms["participant"].items["0"].elements["role"].value
Did you find it helpful? Yes No
Send feedbackSorry we couldn't be helpful. Help us improve this article with your feedback.