Customising the Company Login window series Part 1 - Introduction

David Meego - Click for blog homepageRecently a comment from David M (not me) was posted on the Support Debugging Tool Portal (https://aka.ms/SDT) page asking:

"We have some fairly long names for our GP companies. Well, when logging onto GP, the second "Company Login" screen cuts off the company names too short for us. The entry field for companies allow for longer strings (65 Characters) but only displays 31 characters on the pull-down list. There is plenty of real estate on this window going unused. Can anyone think of a way to enhance/fix this to display more of the company name?"

So, I thought I would explain the difficulty in customising the Company Login window and suggest some solutions.

 

The Scenario

As David mentions in his comment, the Company Name field allows for 64 characters to be entered (shows as 65 at SQL Level), but the drop down list for selecting a company is only about 31 characters wide (depending on actual characters as it is a proportional font). So if company names only differ in the characters at the end, it makes selection very difficult.

 

The Problem

What makes this window harder to work with is that it is accessed before the user has fully logged in (unless changing companies while already logged in). So why does that make a difference?

The simplest solution would be to use the Modifier to create a modified window with the fields wider. This requires a security setting changed using the Alternate Modified Forms and Reports ID to tell Microsoft Dynamics GP to use the modified version of the window. But as we are not logged in yet, the security system is not yet active as it needs both a User ID and a Company ID to work. So Modifier cannot be used.

The only methods to modify the window that will work will need to be script based.

The comment was posted on the Support Debugging Tool page because the SDT has been used to customise windows before. The best example of this being the SmartList Splitter as described in the post: Update: Resizing SmartList TreeView and ListView panes using the Support Debugging Tool. The problem with using the SDT, is that its Automatic Debugging Mode triggers are only enabled after Company Login is completed. So the SDT trigger scripts could not help with this situation.

 

The Solutions

There are a number of approaches we could use to resolve the issue of selecting a company when the Company Names are too long to be easily differentiated in the drop down list.

  1. Change the company name, for example:
    1. Change the company names to shorter names.
    2. Change the company names so that the differentiating part is near the beginning of the company name.
    3. Change the company name to include the Intercompany ID or some other code at the beginning of the company name.
       
  2. Make the drop down list field wider, using:
    1. Dexterity to directly modify the Switch Company form in the Dynamics.dic.
       
      Note: This is not supported and is not really allowed as you are not allowed to distribute a modified Dynamics.dic dictionary.
       
    2. Using Visual Basic for Applications (VBA) to manipulate the field position and size.
    3. Using Dexterity Triggers in a custom dictionary to manipulate the field position and size.
    4. Using Visual Studio Tools (C# or VB.Net) in a custom dll addin to manipulate the field position and size.
       
  3. Add the Intercompany ID (Database Name) at the beginning of the drop down list, using:
    1. Using Visual Basic for Applications (VBA) to update the field values.
    2. Using Dexterity Triggers in a custom dictionary to update the field values.
    3. Using Visual Studio Tools (C# or VB.Net) in a custom dll addin to update the field values.
       
  4. Use combination of both options 2 and 3 to make the field wider and add the Intercompany ID, using:
    1. Using Visual Basic for Applications (VBA) to manipulate the field position and size and update the field values.
    2. Using Dexterity Triggers in a custom dictionary to manipulate the field position and size and update the field values.
    3. Using Visual Studio Tools (C# or VB.Net) in a custom dll addin to manipulate the field position and size and update the field values.

In the next blog articles in this series I will demonstrate each of these examples using Visual Basic for Applications, Dexterity and Visual Studio Tools for Microsoft Dynamics GP

Stay tuned.

[Edit] Part 2 is now available Customising the Company Login window series Part 2 - Visual Basic for Applications.

David

21-Jul-2014: Added link to second article in the series.