
Ryan Farley previously posted about how to get the current Contact context in the Customer Web Portal. This same approach can be used to determine the Saleslogix User context that the Customer Portal is running under.
Expanding on Ryan’s initial post by calling a different service, like so:
Sage.SalesLogix.Security.IWebPortalUserService service = Sage.Platform.Application.ApplicationContext.Current.Services.Get<Sage.Platform.Security.IUserService>() as Sage.SalesLogix.Security.IWebPortalUserService;
if (service != null)
{
Sage.Entity.Interfaces.IContact con = service.GetPortalUser().Contact;
string contactID = con.Id.ToString();
}Sage.SalesLogix.Security.IWebPortalUserService service2 = Sage.Platform.Application.ApplicationContext.Current.Services.Get<Sage.Platform.Security.IUserService>() as Sage.SalesLogix.Security.IWebPortalUserService;
if (service2 != null)
{
Sage.Entity.Interfaces.IUser usr = service2.GetUser() as Sage.Entity.Interfaces.IUser;
string userID = usr.Id.ToString();
}
Subscribe To Our Newsletter
Join our mailing list to receive the latest Infor CRM (Saleslogix) and Creatio (bpm'online) news and product updates!
You have Successfully Subscribed!