Adding the Server and Database name in the footer of the SalesLogix Web Client

Chances are, if you’re a SalesLogix Business Partner or a SalesLogix developer or administrator, you tend to work with more than one SalesLogix client. Either different customer systems or different systems for testing, development, production, etc. I often have several different systems for several different customers. Something I miss about the SalesLogix Web client is the missing ServerDatabase in the footer like in the SalesLogix LAN client. That was nice to have for people like us. We’d get distracted with something else and could determine which system we were in with a quick glance to the footer. Let’s add it back.

This is a fairly easy task, but will require modifying some master pages in the Support Files of the portal. First of all, let’s look at the code to retrieve the current SalesLogix server name and database (connection on the SLX Server).

// Get a reference to the DataService 
Sage.Platform.Data.IDataService datasvc = Sage.Platform.Application.ApplicationContext.Current.Services.Get<Sage.Platform.Data.IDataService>() as Sage.Platform.Data.IDataService;

// Now read the server and database values from the DataService
string currentconnection = string.Format("{0}\{1} - ", datasvc.Server, datasvc.Database);

Easy enough. Now, where to put it? First let’s add a label to show this value. We are going to put it in the base.Master page, located in Support FilesMastersbase.Master.

Look through the file for the footer section. It will contain a div with the following ID: south_panel_content – search for that and you’ll find the footer section. It looks like this:

<div id="south_panel_content" class="x-hide-display">
<span id="copyright"><asp:Localize ID="copyrightMessage" EnableViewState="false" runat="server" Text="<%$ Resources: SalesLogix, Copyright %>"/></span>
<span id="autoLogoff" class="floatright"> </span>
<span id="lclCurrentDate"><smartParts:CurrentDate ID="CurrentDate" runat="server" DateFormat="dd MMMM yyyy" /></span>
<span id="statusMessage" class="floatright"></span>
</div>

We are going to add a line to the bottom of that div section for our label so it looks like this:

<div id="south_panel_content" class="x-hide-display">
<span id="copyright"><asp:Localize ID="copyrightMessage" EnableViewState="false" runat="server" Text="<%$ Resources: SalesLogix, Copyright %>"/></span>
<span id="autoLogoff" class="floatright"> </span>
<span id="lclCurrentDate"><smartParts:CurrentDate ID="CurrentDate" runat="server" DateFormat="dd MMMM yyyy" /></span>
<span id="statusMessage" class="floatright"></span>
<!-- Label to display current SLX server & database -->
<asp:Label runat="server" id="labelDatabase" CssClass="floatright" />
</div>

Now, let’s find the Page_Load to add our code. Locate the line:

protected void Page_Load(object sender, EventArgs e)

We will add out code to the end of the Page_Load with one minor modification. We will change the code to update our label control. The code will look like this (placed at the end of the Page_Load):

// Get a reference to the DataService 
Sage.Platform.Data.IDataService datasvc = Sage.Platform.Application.ApplicationContext.Current.Services.Get<Sage.Platform.Data.IDataService>() as Sage.Platform.Data.IDataService;

// Now read the server and database values from the DataService and place in the label
labelDatabase.Text = string.Format("{0}\{1} - ", datasvc.Server, datasvc.Database);

The final result will look like this:

Much better. Keep in mind that to have this show on the dashboard page you’ll also have to make the change to dashboard.Master as well.

ABOUT THE AUTHOR

Ryan Farley

Ryan Farley is the Director of Development for Customer FX and creator of slxdeveloper.com. He's been blogging regularly about SalesLogix, now Infor CRM, since 2001 and believes in sharing with the community. His new passion for CRM is Creatio, formerly bpm'online. He loves C#, Javascript, web development, open source, and Linux. He also loves his hobby as an amateur filmmaker.

Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe To Our Newsletter

Join our mailing list to receive the latest Infor CRM (Saleslogix) and Creatio (bpm'online) news and product updates!

You have Successfully Subscribed!