back to top

Infor CRM (Formerly Saleslogix) Iterating through all tabs on a Page

Using the TabWorskpace you can iterate through all the tabs on a page and do something with them, like show or hide them.  To do this you need the following code:

private Sage.Platform.Application.UI.UIWorkItem _parentWorkItem;
[Sage.Platform.Application.ServiceDependency(Type = typeof(Sage.Platform.Application.WorkItem))]
public Sage.Platform.Application.UI.UIWorkItem ParentWorkItem
{
    get
    {
        return this._parentWorkItem;
    }
    set
    {
        this._parentWorkItem = value;
    }
}

protected void QuickFormLoad0()
{
    Sage.Platform.WebPortal.Workspaces.Tab.TabWorkspace tabContentWorkspace = null;
    try
    {
        string id = string.Empty;

        tabContentWorkspace = this._parentWorkItem.Workspaces["TabControl"] as Sage.Platform.WebPortal.Workspaces.Tab.TabWorkspace;

        Sage.Platform.Application.IEntityContextService entityContext = this._parentWorkItem.Services.Get<Sage.Platform.Application.IEntityContextService>();

        if (entityContext.HasEntityContext)
        {
            id = entityContext.EntityID.ToString();
        }

        Sage.Entity.Interfaces.IAccount buyer = Sage.Platform.EntityFactory.GetById<Sage.Entity.Interfaces.IAccount>(id);

        if (tabContentWorkspace != null && buyer != null)
        {            
            foreach (Sage.Platform.WebPortal.Workspaces.Tab.TabInfo sp in tabContentWorkspace.Tabs)
            {                
                tabContentWorkspace.Hide(sp.ID, true);   
            }
        }
    }
    catch { }
}
Contact Customer FX for your CRM project
We let our expertise speak for itself - let us know how our all-star team can help on your CRM project
About the Author
Kris Halsrud
Kris Halsrud
Kris Halsrud is a Senior Analyst / Developer for Customer FX Corporation.

10 COMMENTS

  1. Hi Kris,

    For the Account page, what quick form’s Load action holds the code snippet? QuickFormLoad0 of AccountDetails OR QuickFormLoad0 of any tabs?

    Thanks
    xdp

  2. Our Infor CRM web is 8.3. Actually, I want to customize the code to set default tab. For example, when opening Account page, the Contacts tab is displayed by default. Is it possible?

    • The default tab is based on settings stored in the VFS table for each user. The path for this setting in the VFS for the admin user would be: \Configuration\Application_User\SlxClient\admin\ASP.account_aspxDetail\TabWorkspace-E53DA2EE-942A-4b9d-8885-55C2EF1A4E4A.xml

      Inside the xml of that is a node ActiveMainTab which stores the smart part name of the tab that is defaulted.

      I think you would somehow need to update this VFS record for each user on the load of the account form. I am not sure if that would happen early enough to make the tab the active one or if it would happen too late. Never tried doing this specifically.

  3. Using your code for hiding/showing tabs, we can get the tab collection of the current Account, right? From the tab collection, is it possible to locate a certain tab which we want and then set it as displayed (active?) with code (e.g. a method) on the fly?

    • Not sure but I doubt it. The tab selection is client side and this would be server side code. I would guess the only server side way would be as I mentioned to change the default tab in the VFS settings prior to the tabs being opened. Perhaps with client side jscript you could do so, but not sure.

  4. foreach (Sage.Platform.WebPortal.Workspaces.Tab.TabInfo sp in tabContentWorkspace.Tabs)
    ———————————-

    tabContentWorkspace.Tabs is a tab collection, right?

    For this line, sp is Tabinfo. Is there a method or property which can return tab?

  5. Maybe can use tabContentWorkspace.Activate(object smartpart), but don’t know how to get/create the smartpart object, e.g. the object of Contacts quickform.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Infor CRM 10: Phone Number “Starts With” Search Not Working with Formatted Numbers

Infor CRM 10's Starts With search may fail to find phone numbers stored with formatting characters. Learn why this happens, how to identify affected records, and how to resolve the issue.

Increase Attachment Size Allowed in the Infor CRM SLX Web Client

It is possible to increase Infor CRM SLX's limit on the size of a file that can be uploaded by editing values in web.config file.

A Closer Look at the AI Features in Infor CRM v10

Infor CRM v10 includes several built-in Generative AI features that go beyond a simple chatbot. Here's a closer look at AI Summary, AI Assistant, AI Newsfeed, and AI-assisted email drafting.

[Webinar] Infor CRM SLX Admin Essentials: Xbar for Web and Email Marketing

On Tuesday, September 15, 2026, Infor is hosting an...

Infor CRM Mobile 4.4 Now Available: What’s New

Infor CRM Mobile 4.4 is now available for single-tenant cloud and on-premises customers. Explore business card capture, dashboards, workflows, and more.

Related Articles

Infor CRM 10: Phone Number “Starts With” Search Not Working with Formatted Numbers

Infor CRM 10's Starts With search may fail to find phone numbers stored with formatting characters. Learn why this happens, how to identify affected records, and how to resolve the issue.

Increase Attachment Size Allowed in the Infor CRM SLX Web Client

It is possible to increase Infor CRM SLX's limit on the size of a file that can be uploaded by editing values in web.config file.

A Closer Look at the AI Features in Infor CRM v10

Infor CRM v10 includes several built-in Generative AI features that go beyond a simple chatbot. Here's a closer look at AI Summary, AI Assistant, AI Newsfeed, and AI-assisted email drafting.

[Webinar] Infor CRM SLX Admin Essentials: Xbar for Web and Email Marketing

On Tuesday, September 15, 2026, Infor is hosting an administrator-focused webinar covering two areas that can help organizations...

Related Videos