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: Insert Opportunity - Change Account Manager On Load
slxguy
Posts: 71
 
Insert Opportunity - Change Account Manager On LoadYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 May 10 10:02 AM
I'm trying to change the Account Manager on load of the insert opportunity screen. I am using 7.5.2 and getting compiler errors...looks like Sage has changed how you access the current user object yet again.

Any help would be appreciated.
[Reply][Quote]
Andrew Grandin
Posts: 272
 
Re: Insert Opportunity - Change Account Manager On LoadYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 May 10 10:27 AM
To access the current user I use:

Sage.Platform.Security.IUserService usersvc = (Sage.Platform.Security.IUserService)Sage.Platform.Application.ApplicationContext.Current.Services.Get();

then for the username: string user = usersvc.UserName.ToString();
or userid: string userid = usersvc.UserId.ToString();
[Reply][Quote]
slxguy
Posts: 71
 
Re: Insert Opportunity - Change Account Manager On LoadYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 May 10 10:40 AM
I need access to the user object however so i can set my the lookup control's result. The IUserService doesn't seem to give me access to the object.
[Reply][Quote]
Jason Daraz
Posts: 12
 
Re: Insert Opportunity - Change Account Manager On LoadYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 May 10 11:24 AM
Sure it does, at least it did the last time I used it:

Sage.SalesLogix.Security.SLXUserService usersvc = (Sage.SalesLogix.Security.SLXUserService)Sage.Platform.Application.ApplicationContext.Current.Services.Get<Sage.Platform.Security.IUserService>();

Sage.Entity.Interfaces.IUser user = usersvc.GetUser();

This is the way I've always accessed the user in 7.5.


[Reply][Quote]
slxguy
Posts: 71
 
Re: Insert Opportunity - Change Account Manager On LoadYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 May 10 11:30 AM
Quote:
Originally posted by Jason Daraz

Sure it does, at least it did the last time I used it:

Sage.SalesLogix.Security.SLXUserService usersvc = (Sage.SalesLogix.Security.SLXUserService)Sage.Platform.Application.ApplicationContext.Current.Services.Get<Sage.Platform.Security.IUserService>();

Sage.Entity.Interfaces.IUser user = usersvc.GetUser();


Jason that will not compile for me:

ERROR - The type or namespace name 'Security' does not exist in the namespace 'Sage.SalesLogix' (are you missing an assembly reference?)

I cannot even add Sage.SalesLogix.Security as a reference (using Sage.SalesLogix.Security because it does not exist in that namespace.
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Insert Opportunity - Change Account Manager On LoadYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 May 10 11:34 AM
Seems as if you need to add the Reference.

Open the Script, and then access the Properties panel.
On the Properties panel, click on the Ellipsis next to Assemblies.
Add a new Entry, and put in the DLL name for Sage.SalesLogix.Security (Not 100% sure, but I would guess it is Sage.SalesLogix.Security.dll).

Rebuild to check if the error goes away.
[Reply][Quote]
slxguy
Posts: 71
 
Re: Insert Opportunity - Change Account Manager On LoadYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 May 10 12:47 PM
Thanks Raul, seems like I am getting closer. I've added the reference and now I get the following error - however - I can't find anything along those lines to add as a reference.

The type 'Sage.SalesLogix.Security.Entities.User' is defined in an assembly that is not referenced. You must add a reference to assembly 'Sage.SalesLogix.Security.Entities, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.

On a related note this line compiles:
Sage.SalesLogix.Security.SLXUserService myUserService =
form.Services.Get() as Sage.SalesLogix.Security.SLXUserService;

When I add in the next line is when i get the compiler error (seems like when I go to access the User object):

form.usrUser.LookupResultValue = myUserService.GetUser();
[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 10:18:38 AM