Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Copper Contributor
Posts: 18
Registered: ‎12-08-2009

SalesLogix Web - User Access Log (Audit)

For those who want to keep a log of user access on SalesLogix Web, here's something I did and it worked great!


  1. Create a new Entity UserLog (Fields: UserId,AccessDateTime,SessionId)
  2. Apply this code on base.master
  3. In order to prevent add multiple records, I'm using the .SLXAUTH from the Cookie...


string sessionId = Request.Cookies[".SLXAUTH"].Value.ToString();
Sage.Entity.Interfaces.IUserLog currentsess = Sage.Platform.EntityFactory.GetRepository<Sage.Entity.Interfaces.IUserLog>().FindFirstByProperty("SessionId", sessionId);

if (currentsess==null){
Sage.Entity.Interfaces.IUserLog newAccess =Sage.Platform.EntityFactory.Create<Sage.Entity.Interfaces.IUserLog>();
Sage.Entity.Interfaces.IUser usr = Sage.SalesLogix.API.MySlx.Security.CurrentSalesLogixUser as Sage.Entity.Interfaces.IUser;
newAccess.UserId = usr.Id.ToString();
newAccess.SessionId = sessionId.ToString();
newAccess.AccessDatetime = DateTime.Now;





Copper Contributor
Posts: 31
Registered: ‎04-08-2010

Re: SalesLogix Web - User Access Log (Audit)

Where within base.master did you apply this code?