Quantcast
Channel: SalesLogix 8.1 – Customer FX
Viewing all articles
Browse latest Browse all 25

Infor CRM (Formerly Saleslogix) Getting the Current User and Contact Context in the Web Custom Portal

$
0
0

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();
            }


Viewing all articles
Browse latest Browse all 25

Trending Articles