Get Destination User in code behind of client event

  • 15 August 2008
  • 2 replies
  • 0 views

Badge +4

In the code behind of a client event the following code is run to add a worklist item for a user. How can I determine who the destination user is within this function? 


private

void SendWorkToInternet(object sender, EventArgs e) {


string strURL = K2.Configuration.InternetUrl;


strURL = strURL.Replace(

"{SERIALNO}", K2.SerialNumber);


K2.AddWorklist(K2.Configuration.InternetPlatform, System.Web.

HttpUtility.UrlPathEncode(strURL));


}


 


Mike Trouard


2 replies

Badge +4

you can't :) this is the client event not the destination rule.

view code of the destination rule.

Badge +8

Hi Mike,


If your Destination Rule is configured as Plan Once and your destination is a group of people like a K2 Role, this will not work, see my post: http://k2underground.com/forums/post/23984.aspx,


However, if the Destination rule is configured as Plan per Destination, you can use  K2.ActivityInstanceDestination.User


 


 

Reply