In the SalesLogix LAN client and web client one of the most requested thing I am asked is how do you hide tabs at run time.
In the web client this is actually really easy. You can wire this up on a load action of a quick form like so:
Sage.Entity.Interfaces.ISalesOrder salesorder = this.BindingSource.Current as Sage.Entity.Interfaces.ISalesOrder;
Sage.Platform.WebPortal.Workspaces.Tab.TabWorkspace tabs = this.ParentWorkItem.Workspaces[“TabControl”] as Sage.Platform.WebPortal.Workspaces.Tab.TabWorkspace;
tabs.Hide(“SalesOrderChangeOrders”, (salesOrder.OrderType==”Change Order”));
The key here is once you get a reference to the tabs workspace, you can call the Hide method which then accepts two parameters, the Smart Part ID to show or hide, and a Boolean parameter. The second Boolean parameter is set to True to hide and False to not hide. Note, that since this code runs after the tabs are actually loaded onto the page, the tab you are showing or hiding needs to be present as a loaded smart part.