Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Monday, June 30, 2025 
 
slxdeveloper.com Community Forums  
   
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!
 Web Forums - SalesLogix Web Platform & Application Architect
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Web Platform & Application Architect | New ThreadView:  Search:  
 Author  Thread: Setting a lookup control with Current User value
Donovan Mitchell
Posts: 5
 
Setting a lookup control with Current User valueYour last visit to this thread was on 1/1/1970 12:00:00 AM
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?
[Reply][Quote]
Donovan Mitchell
Posts: 5
 
Re: Setting a lookup control with Current User valueYour last visit to this thread was on 1/1/1970 12:00:00 AM
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?
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Setting a lookup control with Current User valueYour last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Setting a lookup control with Current User valueYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Apr 10 12:36 PM
BTW, you can do this as well with the MySlx API now too.

Sage.SalesLogix.API.MySlx.Security.CurrentSalesLogixUser;
[Reply][Quote]
Donovan Mitchell
Posts: 5
 
Re: Setting a lookup control with Current User valueYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Apr 10 4:06 PM
Thanks Ryan
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 6/30/2025 1:48:54 PM