Login / Register  search  syndication  about

          Ryan Farley's Blog

Ryan Farley on .NET Development with a focus on CRM Development for SalesLogix

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 Server\Database 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 Files\Masters\base.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.

What's This?
Bookmark and Share

About Ryan Farley

   Ryan Farley is the Director of Development for Customer FX Corporation and the creator of slxdeveloper.com.

Don't miss Ryan's Git for the SalesLogix Developer series!



Related Content
   SalesLogix Cloud- Administration Options- Using Roles
In this webinar the user will learn to manage roles in the SalesLogix Web Client. These options are onl
Posted on Aug 20, 2010 by Dale Richter to Free SalesLogix Training
 
   SalesLogix 7.5.2 Speed Issues - How To Find the Slowdown
At times I have been asked how can I increase the performance of SalesLogix. For systems using SQL2005
Posted on Aug 13, 2010 by Mark Duthoy to SalesLogix Support
 
   SalesLogix Cloud- Administration Options- Creating a New Department
In this webinar we will look at the Administration Options in the SalesLogix Cloud. In this specific webi
Posted on Aug 13, 2010 by Dale Richter to Free SalesLogix Training
 
   SalesLogix Cloud- Administration Options- Creating a New Team
This Administrative webinar will show the user how to create a new Team for ownership of records. This is
Posted on Aug 13, 2010 by Dale Richter to Free SalesLogix Training
 
   Relating Assets to Tickets in SalesLogix Web and SalesLogix Cloud [Video]
In this SalesLogix Training webinar the user will learn how to relate an Asset to a Ticket in SalesLogix
Posted on Aug 12, 2010 by Dale Richter to Free SalesLogix Training
 
Comments

 

Twitter Trackbacks for Adding the Server and Database name in the footer of the SalesLogix Web Client - Ryan Farley's Blog [customerfx.com] on Topsy.com said:

Pingback from  Twitter Trackbacks for                 Adding the Server and Database name in the footer of the SalesLogix Web Client - Ryan Farley's Blog         [customerfx.com]        on Topsy.com

April 2, 2010 8:19 PM

Leave a Comment

(required)  
(optional)
(required)  
Add
All contents Copyright © 2010 Customer FX Corporation
Customer FX Corporation
2324 University Avenue West, Suite 115
Saint Paul, Minnesota 55114
Tel: 800.728.5783

  Follow @CustomerFX on twitter
Follow the best news, tips, and articles
  Subscribe to Customer FX on youtube
Watch SalesLogix tutorial videos from Customer FX
Login / Register