Skip to main content
Nintex Community Menu Bar

Object Reference not set to an instance of an object

  • October 16, 2006
  • 2 replies
  • 28 views

Forum|alt.badge.img+2
We are attempting to finish a worklist item from K2Rom, and the client event finishes successfully, but the subsequent server event errors with the following:

System.NullReferenceException: Object reference not set to an instance of an object.
at K2Code1029.Main(ServerEventContext K2)

This is due to the following, but can't figure out why.

K2.ActivityInstanceDestination.User (the User object is null)

Here is the server event code

public void Main(ServerEventContext K2)
{
K2.Synchronous = true;

// get the user id for the specific activity inst that occupied the one slot for this activity
K2.ProcessInstance.DataFields["IndividualUserName"].Value = K2.ActivityInstanceDestination.User.FQN;

}

2 replies

Forum|alt.badge.img+8
  • October 17, 2006
is this server event located in the same activity as the client event?

Forum|alt.badge.img+2
  • Author
  • October 17, 2006
Yes, it is located in the same Activity, one right after the other.