Back in 2009, Ryan wrote about how to determine if a user is in a team. His last code snippet example is no longer valid as those methods now return different object types. His old code was this:
Sage.SalesLogix.Security.SLXUserService usersvc = (Sage.SalesLogix.Security.SLXUserService)Sage.Platform.Application.ApplicationContext.Current.Services.Get<Sage.Platform.Security.IUserService>();
Sage.SalesLogix.Security.User user = usersvc.GetUser();
System.Collections.Generic.IList<Sage.SalesLogix.Security.Owner> teamlist = Sage.SalesLogix.Security.Owner.GetTeamsByUser(user);
string list = string.Empty;
foreach (Sage.SalesLogix.Security.Owner team in teamlist)
{
list += team.OwnerDescription + "rn";
}
QFTextBox.Text = list;
The new code should be this:
System.Collections.Generic.IList<Sage.Entity.Interfaces.IOwner> teamlist = Sage.SalesLogix.Security.Owner.GetTeamsByUser(Sage.SalesLogix.API.MySlx.Security.CurrentSalesLogixUser);
string list = string.Empty;
foreach (Sage.Entity.Interfaces.IOwner team in teamlist)
{
list += team.OwnerDescription + "rn";
}
QFTextBox.Text = list;



