Get User Login from Work Item on ASP.NET Page

  • 30 July 2009
  • 2 replies
  • 2 views

Badge +1

I am new to K2.  Is there a way through code to get the user (domainusername) from a work item.  The problem is that I have an ASP.NET page that a manager uses to accept or reject a work item.  I need to display the data using the login of the person who submitted the data for that work item. 


Any help would be greatly appreciated.


2 replies

Badge +3

Hi


I am assuming you want to retrieve the workflow originator through code in the process itself, to accomplish this use the following in a server event on the process.


K2.ProcessInstance.Originator.FQN;


 -----------------------------------------------------------------------------------------------------------------


The information contained herin does not reflect the view of K2, this is my own opinion


 


 


 

Badge +8

An additional tip, to get the current logged on user's identity in an ASP.NET page, you can use the following:

string sUserName = System.Environment.UserDomainName + """ + System.Environment.UserName; 

Reply