The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
Setting a lookup control with Current User value
Posted: 05 Apr 10 10:02 AM
|
I have a lookup control on an insert view, and I'd like to default it to the current logged in user. I'm trying to figure out how to do this in the load actions of the form, but am not having much luck. Can anyone help me out? |
|
|
|
Re: Setting a lookup control with Current User value
Posted: 05 Apr 10 10:26 AM
|
Looking at some of the other threads here, it seems like I need to be using the SLXUserService, however other examples here instantiate that as Sage.SalesLogix.Security.SLXUserService and all I have under SalesLogix is API (Sage.SalesLogix.API) Am I missing somthing? |
|
|
|
Re: Setting a lookup control with Current User value
Posted: 05 Apr 10 12:15 PM
|
You cannot always trust the intellisense in the code editor in AA. As long as you fully qualify the names then it will work.
Sage.Platform.Security.IUserService userService = Sage.Platform.Application.ApplicationContext.Current.Services.Get<Sage.Platform.Security.IUserService>(); IUser user = userService.GetUser(); // Or string userid = userService.UserId;
Make sense?
-Ryan |
|
|
| |
| |
|