Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, July 1, 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: How to Hide / Show Groups dropdown ?
Alberto R
Posts: 9
 
How to Hide / Show Groups dropdown ?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Oct 09 12:06 PM
Hi there does anyone know how to hide the Groups dropdown (the one that allows to Add, Manage, Edit groups, on the right upper side). Currently I have the code below to hide / show items from the toolbar based on the user team, however I am not able to see the Groups dropdown while debugging the code, I think this Groupsd ropdown is not part of the ToolbarWorkspace. Any Ideas?

Thanks in advance.

User user = (_userService as SLXUserService).GetUser();
if (user.Id.ToLower().Trim() == "admin") return;
if (!IsOnTeam("Midwest", user))
{
ToolbarWorkspace toolbar = _parentWorkItem.Workspaces["ToolBar"] as ToolbarWorkspace;
IMenuService menusvc = toolbar.WorkItem.Services.Get();
NavItemCollection navcol = menusvc.FindMenu("mnuTools") as NavItemCollection;
if (navcol != null)
{
navcol.RemoveItem("tools_ImportLeads");
}
}
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: How to Hide / Show Groups dropdown ?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Oct 09 12:40 PM
Not sure how to do it from the server side, it may be possible. Never the less, a quick review of the HTML objects reveals that that menu is wrapped on a division called "GroupMenuSpace", so you could use some quick javascript to hide it:

var obj = document.getElementById('GroupMenuSpace');
obj.style.display = 'none';

[Reply][Quote]
Jose Urena
Posts: 92
 
Re: How to Hide / Show Groups dropdown ?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Feb 10 2:31 PM
Add the following to the C# code of your base.master:

protected void Page_PreRender(object sender, EventArgs e)
{
if (EsManager() == "F") {

this.Label_mostrarGrupo.Text = "<script type='text/javascript'>xzHideGroup();";
} else {
this.Label_mostrarGrupo.Text = "BUSCADO";
}
}
protected string EsManager()
{
if(this.Label_mostrarGrupo.Text == "INICIAL")
{
Sage.SalesLogix.Security.SLXUserService currentuser = Sage.Platform.Application.ApplicationContext.Current.Services.Get() as Sage.SalesLogix.Security.SLXUserService;
Sage.Platform.Data.IDataService service = Sage.Platform.Application.ApplicationContext.Current.Services.Get();
System.Data.IDbConnection cnn = service.GetConnection();
cnn.Open();
System.Data.IDbCommand cmd = cnn.CreateCommand();
string sql_Reglas = "select IsManager from usersecurity where userid='" + currentuser.GetUser().Id + "'";
cmd.CommandText = sql_Reglas;
System.Data.IDataReader MyDataReader = cmd.ExecuteReader(System.Data.CommandBehavior.CloseConnection);
MyDataReader.Read();
string esono = MyDataReader["IsManager"].ToString();
MyDataReader.Close();
cnn.Close();
cmd.Dispose();
return esono;
} else {
if(this.Label_mostrarGrupo.Text =="BUSCADO") { return "T"; } else { return "F"; }
}
}

then add the following to your javascripts on base.master:

function xzHideGroup()
{
var obj = document.getElementById('ToolBar_GroupEditorMenu');
obj.style.display = 'none'; }

finally, locate the mainworkarea DIV and insert the following just before the DIV TAG:

<asp:Label ID="Label_mostrarGrupo" Runat="server" Width="410px" Text= "INICIAL" style="display:none"/>

If the user have the "Is Manager" checked, will see the groups button.
[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): 7/1/2025 8:11:06 AM