back to top

How SmartPart definitions on a SalesLogix web page are rendered

In the SalesLogix Application Architect, each main page has a definition of the various components found on the page.  These are things such as smart parts (tabs, detail views) and modules.  If you look at something like the Account page (found in the SalesLogix Application Architect under the VFS…Portal Manager…Sage SalesLogix…Pages…Account Detail) you can see the various smart parts that comprise the UI that is rendered when a user navigates to the Account area of SalesLogix:

Application Architect Account Page Definitions

The smart parts listed here have several attributes such as the target workspace and show in mode.  The Target Workspace defines what section of the page the smart part gets rendered in:  Main Content, NavBar, TabControl, Task Pane, Toolbar, and DialogWorkspace.  The show in mode defines in what view mode the smart part shows (List, Detail, Both).

Once these attributes are defined the SalesLogix web deployment reads these settings and renders a main ASP page and code file.  These files are found in the root of the portal deployment (typically in the SLXClient folder).  For the Account page you will see an Account.aspx and Account.aspx.cs file.  If you examine the code file you can see that there is an OnLoad event which defines the following actions:

base.OnLoad(e);
SetTitleBar();
MenuService mnuService = new MenuService();
this.Page.Form.Controls.Add(mnuService);
this.PageWorkItem.Services.Add<IMenuService>(mnuService);
LoadLayout(this.Master);
LoadNav();
LoadMenu();
LoadSmartParts();
LoadModules();
LoadTasklets();

All of these methods are also defined in the code file under the Helper Methods section.  The one particular one that deals with what tabs are rendered on the page is called LoadSmartParts. (BTW, you can see here that the LoadModules runs after all of the other events.  That is how this post that Ryan Farley wrote is able to use a module to affect the menus available on the page.)

Lets take a look at what the LoadSmartParts method is doing.

You can see that there are various IF blocks inside this method that checks to see if the IsModeMatch() result and the IsRoleMatch() result return the values as defined on our Page definition found under the Portal Manager.  For instance we can see for the main detail part of the account screen we have the following conditional statement:

    if(IsModeMatch(“Detail”) && IsRoleMatch(“”))
            {
            }

Inside the condition we can see that the script loads the corresponding control which is also defined under the Page definition on the Portal Manager.  Throw in some error trapping code and the code that then actually renders the smart part in the correct Workspace and you have the full code block:

if(IsModeMatch(“Detail”) && IsRoleMatch(“”))
{
    Control AccountDetails = null;
    try
    {
        AccountDetails = LoadControl(“~/SmartParts/Account/AccountDetails.ascx”);
    }
    catch (Exception ex)
    {
        AccountDetails = new LiteralControl(ex.Message);
    }
    AccountDetails.ID = “AccountDetails”;
    this.PageWorkItem.Workspaces[“MainContent”].Show(AccountDetails, new SmartPartInfo(GetResource(“AccountDetails.Title”), GetResource(“AccountDetails.Description”)));               
}

So there it is.  From definitions of the Page on the Portal Manager to the actual deployed files. 

A helpful tip: In the past I have seen where a smart part was added to a Portal Page yet it failed to show once the site was deployed.  Under some circumstances the system does not recognize a smart part was added to the page.  This can be confirmed by looking at the deployed code file for the page in question.  If the condition block is not present to load the smart part you can typically force the system to recognize it by modifying the Page definitions again and then re-deploying. 

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.

2 COMMENTS

  1. Hi Kris,

    Thanks for this article!
    I could follow along till the step you started iterating through the details of the LoadSmartParts() method.
    There is no ‘IsModeMatch’ neither’IsRoleMatch’ nor IF blocks in my case.

    Instead, It is a suite of ‘RegisterSmartPart’ calls like the one below.

    RegisterSmartPart(“MainContent”, “Detail”,””,”~/SmartParts/Account/AccountDetails.ascx”, “AccountDetails”,GetResource(“AccountDetails.Title”),GetResource(“AccountDetails.Description”),AccountDetailsProperties);

    Any idea why I don’t have those blocks? Is it a version related issue?

    Thanks

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Infor CRM Sync for Exchange: Action Required by August 31, 2026

Using Infor CRM Sync for Exchange with Microsoft 365? Your Exchange administrator must update tenant settings by August 31, 2026 to prevent sync disruption.

[Webinar] What’s Coming Next for Infor CRM SLX and Why v10 Matters

See what’s coming next for Infor CRM SLX, including new marketing workflows, automation improvements, and reasons to consider upgrading to v10.

Disable Caching in Infor CRM SLX Web Client

In the rare case caching is causing issues in the Infor CRM SLX web client, it is possible to disable specific types of caching by making edits using Application Architect, and then deploying.

Exploring AI Options for Infor CRM v10

I've started taking a closer look at the AI capabilities built into Infor CRM v10. Over the next several posts, I'll share what I learn. From the built-in features and supported AI providers to implementation considerations, costs, and practical use cases.

Infor CRM SLX 10.0: Delegate Ownership Changes for “Everyone” Records

Learn how the new EveryoneOwnerAssignment secured action in Infor CRM SLX 10.0 allows designated users to change ownership of Everyone-owned records without requiring Administrator access.

Related Articles

Infor CRM Sync for Exchange: Action Required by August 31, 2026

Using Infor CRM Sync for Exchange with Microsoft 365? Your Exchange administrator must update tenant settings by August 31, 2026 to prevent sync disruption.

[Webinar] What’s Coming Next for Infor CRM SLX and Why v10 Matters

See what’s coming next for Infor CRM SLX, including new marketing workflows, automation improvements, and reasons to consider upgrading to v10.

Disable Caching in Infor CRM SLX Web Client

In the rare case caching is causing issues in the Infor CRM SLX web client, it is possible to disable specific types of caching by making edits using Application Architect, and then deploying.

Exploring AI Options for Infor CRM v10

I've started taking a closer look at the AI capabilities built into Infor CRM v10. Over the next several posts, I'll share what I learn. From the built-in features and supported AI providers to implementation considerations, costs, and practical use cases.

Related Videos