K2.SerialNumber Alternatives


Badge +8

How can get the K2.SerialNumber associated with an activity on its escalation event. I tried gathering them in a datafield and using some logic to map to appropriate users but K2.ActivityInstance.destination.User was also not available on escalation.


Im embedding the email link of the activity in an email event within that activity but the same feature is not available on escalation of the activity


2 replies

Badge +8

I have not run into this issue and I am surpised you do not have access to the Serial Number.  However one thing you could do is create a Activity Field called SerialNumber.  Then add some custom code to the client event to set the SerialNumber field.  Then your escalation event handlers, you can access the SerialNumber field...


Jason

Badge +8

Jason,


I was trying to embed the link to the activity in that event escalation mail as well. but it eventually turned out that K2.Serialnumber was not accessible from that context. so i thought i would create KeyValuePair list of the destination user and their corresponding SerialNumbers and that too flopped because even though i could form the list i was not able to access the K2.ActivityInstannce.Destination.User from the event escalation email.


I was surprised that both K2.SerialNumber and K2.activityInstance.Destination.User was not available on event escalation which has destinations. So i decided to do a work around by combining the K2.ProcessInstance.ID and the K2.ActivityInstance.ID to create the serial number.


Again K2.Activityinstance.Id was not available..But it was available in the email config wizard(the ellipses) . finally i got the K2.Activityinstance.Id from the config and combined that with processinstance.ID and created the SerialNumber.(Whew....)

Reply