Current User

Okay, I have searched this forum and am trying to use this code but keep getting an error about Core does not exist in the namespace Ice.

//All - Current User
	private void iniuser()
	{
		Ice.Core.Session Session = (Ice.Core.Session)MainController.Session;
        //function for setting a field to the current user to be used for anything later
        String iniuser = Session.UserID;
       }

You need the assembly reference.

CurrentUserID is also available from the CallContextClientData table.

Just wanted to follow up on what these fine gents have said.

To use Ice.Core.Session, you need to reference (Ref Assembly Manager): Ice.Core.Session.DLL in your client folder

For the CallContext you can access like this:

var CCCData = oTrans.Factory("CallContextClientData");
var user = CCCData.dataView[CCCData.Row]["CurrentUserId"].ToString();