Sunday, August 30, 2009

Applying Microsoft Dynamics GP v10 service pack 4: Tales from the trench

It's a gloomy and rainy day in Atlanta, so I figured I could do something productive while under lockdown. I currently run Microsoft Dynamics GP build number is 10.00.1193 -- service pack 3, which was installed using the Feature Pack 1 DVD image available on CustomerSource and PartnerSource under the Product Release section. This build installs the Dexterity dictionary 10.0.320.

Before beginning the installation of SP4, I created a backup copy of my current GP installation folder just in case I needed to revert to it, and of course, backed up all forms, reports, and VBA projects, and my DYNAMICS and company databases. I also backed up the registry key corresponding to the GP installation, HKLM > Software > Microsoft > Business Solutions > Great Plains.

The upgrade operation began by launching the Service Pack 4 msp installation file.


After 5 minutes of the "10.0 is being configured on your computer" process, the installation script began "Gatherting required information" to calculate the installation steps required to deal with my environment's configuration.



That went fairly fast, until the progress bar reached 90%. This is when things slowed down again for approximately another 2 minutes.

Once planning phase was up, another progress bar began letting me know that "10.0 is being configured" on my computer, presenting a progress bar with the time remaining.



Approximately 1 second before the "Time remaining" phase was up, I got an error saying "DEX.DIC version 10.0.320 is not compatible with executable version 10.0.324.0".The error showed up one more time and I clicked the OK button to continue. No other indications, except for the message that anything was wrong.



The process went along and completed "successfully" with all service pack files copied into the GP installation folder. All the Dexterity Shared components were replaced.





I then lauched Dynamics Utilities...remember that DEX.DIC error? There it was again! At this point, the only safe recovery option to protect my data's integrity was restoring all previous backups: databases, reports, forms, registry entries, and application folders.

I then downloaded the latest hotfix prior to SP4, 10.00.1328 (KB971014), and repeated the installation process. Everything went fine. I did not receive the pesky Dexterity dictionary version check error, all system and company tables upgraded without a hitch. All my reports and forms upgraded successfully. I noticed the Dexterity dictionary version for this hotfix was 10.0.320. The question now was, would I receive the same error attempting to install SP4?

I repeated all the installation steps I previously described. The good news this time, the installation of the Service Pack 4 components completed without a hitch.

I onced again launched Utilities, this time to upgrade all system and company tables as required. The product validation went on successfully. SP4 rightfully detected the existance of a previous version. I clicked Next to continue with the system database upgrade. This operation completed successfully with the account framework synchronization.



Next was the company update process...this also went substantially smooth and fast. As to the error, I cannot say for sure whether the installation steps call to be on a specific Microsoft Dynamics GP hotfix build prior to beginning the installation of Service Pack 4, or if this is something that is unique to my environment configuration, but at least the word is out. If you find yourself in this situation, you may be forced to upgrade to the latest hotfix prior to the release of SP4 to correct this situation.

There is also another issue with the original Service Pack 4 installation, with SmartList Builder and Excel Report Builder. If you attempt to save a calculation, you will receive the error "Wrong number of arguments to 'Replace_Text'".



Fortunately, all you need to do is download a chunk file and apply to solve this problem. You will find a link to the chunk download by clicking on a link under the Current Release Downloads secition of the Service Pack, Hotfix, and Compliance page.



You are now directed to the error page, where you can download a zip file with the fix, under the Hot Topics area.



Applying the chunk was very simple, but is always recommended that you backup your data.

[Updated 09/02/2009]
Chad A., a user on the Dynamics GP newgroup reported having the same problem. This was his reply:

Found the issue! Looks like Microsoft changed the name of the dictionary from dex.dic to dex_us.dic (there is also a dex_int.dic) back in the day. My GP 10 SP3 install had both files (dex.dic and dex_us.dic) at the same version (10.0.320). SP4 upgraded dex_us.dic but didn't upgrade dex.dic. I checked the dynamic.set, dynutils.set, and dex.ini file but didn't see it listed anywhere so I just renamed dex_us.dic to dex.dic. That stoped the error message.

We started on GP 7.5 way back in the day. I wonder if that name change got
stuck in the system because we upgrade each time.

Microsoft should probably look into this. I will wait a little bit to see if they catch it, otherwise I may have to send an email to some internal Microsoft GP people I know.
Hope you find this response useful.

Until next post!

MG.-
Mariano Gomez, MIS, MCP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/

Saturday, August 29, 2009

More ways to follow The Dynamics GP Blogster

A few months aback I announced the availability of The Dynamics GP Blogster blog site on Amazon's Kindle. However, did you know you can follow me on other social media networks as well?




Follow me on Facebook




Follow me on Twitter




Follow me on the Microsoft Dynamics Community website





Follow me on LinkedIn



Whatever Social Networking tool you use, be sure to keep up with the latest Microsoft Dynamics GP articles from yours truly, The Dynamics GP Blogster.

Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/

Wednesday, August 26, 2009

Dex - Enabling long physical table names

As many of you may (or may not) know Dexterity had its origins in the days of the 8.3 file length limitation, imposed by the FAT file system found in the early versions of Windows -- for more information, see the article Understanding how Microsoft Dynamics GP works with Microsoft SQL Server by David Musgrave over at Developing for Dynamics GP -- This limitation reflected on the names of the physical files supported by the ISAM file servers at the time, FairCom (Ctree) and Btrieve.

The physical name constraints carried over to Microsoft SQL Server table naming convention, leaving tables with what a new bread of database administrators, systems administrators, and developers have denominated "cryptic names". The fact is, reworking table physical names to support SQL Server would have been quite an expensive task, so the decision was made to continue with these names.

Nonetheless, Dexterity was enhanced to allow long physical table names, but this option needs to be activated prior to adding new tables to a Dexterity-based application. To enable long table names, follow these steps:

1. In Dexterity, click on the Edit menu option, then choose Options...



2. In the Options window, click on Allow Long Physical Table Names to enable the checkmark.



3. Click Ok to accept the changes. That's it!

When the long physical table names option is not enabled, Dexterity may trick you into believing that you can enter those long names. Such physical names will then get truncated to 8 characters without any warnings.

New Microsoft Dynamics GP modules and third party applications now display long physical table names with explicit meaning, facilitating reporting from external sources. However, I still love the 'old' table names... they keep me gainfully busy!

Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/

Monday, August 24, 2009

Microsoft Dynamics GP v10 Service Pack 4 now available

The highly anticipated Microsoft Dynamics GP v10 Service Pack 4 is hot out of the oven! Service Pack 4 had been expected by the end of this week, but the development and tesing teams worked around the clock to beat the deadline.

Service Pack 4 addresses a number of issues and delivers new features, such as International ACH Transactions (IAT) and Extender enhancement capabilities for forms and detail forms.

Extender Forms Enhancements

  • Create new data entry forms for master files and transactions
  • Create SmartLists for each new form
  • Add Note windows and Note List windows
  • Create conditional and calculated fields
  • Use lookups to link to any Microsoft Dynamics GP or third party table
  • Generate the next master ID numbers automatically
  • Add up to 50 extra windows for each form
  • Open associated applications from files
  • Use templates to default fields and increase data entry speed
  • Create multicurrency forms
  • Create views
  • Import data into forms
Extender Detail Forms Enhancements
  • Create scrolling windows with up to ten user defined fields
  • Import data into detail forms
  • Add detail forms as quick links on the Home Page
SP4 will bring the Dynamics dictionary build number to 10.00.1368, but be sure to read the Installation Guide topics. There is an issue with Service Pack 4 that changes the OLEPath in the Dex.ini to the default local path. If you use OLE Notes and have a path to a network share, make sure to review the Dex.ini at each client workstation following the hotfix installation to ensure the path is correct. This issue is currently under review for a fix release. The default location for the Dex.ini is C:\Program Files\Microsoft Dynamics\GP\Data.

You can download Microsoft Dynamics GP v10 Service Pack 4 from:

CustomerSource - Click here
PartnerSource - Click here

Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com

Thursday, August 20, 2009

International ACH Transaction (IAT) functionality for Microsoft Dynamics GP 10.0

For those of you awaiting key EFT enhancements in Microsoft Dynamics GP, here is a bit of news published back in July -- a bit late, but still worth sharing.
The National Automated Clearing House Association (NACHA) and Office of Foreign Assets Control (OFAC) have published new specifications for International ACH Transactions (IAT). As of September 18, 2009 the new IAT code will need to be in place that requires participants to identify international transitions and to code these transactions as IAT transactions.

Additional information regarding the specification can be found at
http://www.nacha.org/IAT_Industry_Information/

Microsoft Dynamics GP 10 will support the new International ACH Transaction (IAT) ACH format changes with the release of Microsoft Dynamics GP 10 service pack 4. The electronic file transfer (EFT) formats will be changed for Microsoft Dynamics GP Payables and Receivables modules.

Note: The Royal Bank of Canada file format specification changes will also be included in 10 service pack 4.
The latest word on service pack 4 is that it will be available on the week of August 24.

Until next post!

MG.-
Mariano Gomez, MIS
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/

Tuesday, August 18, 2009

Microsoft Dynamics GP Technical Conference 2009

The dates are in! Microsoft Dynamics GP Technical Conference 2009 will be hosted in Fargo, North Dakota from November 9 through November 11. The Technical Conference is geared towards Microsoft Dynamics GP developers, implementers, and technical resources in general.

In addition, David Musgrave is working through Microsoft to have me as a co-presenter of two of his sessions. If no arrangements are made, I still will be attending the Conference and the sessions where I expect to meet a good number of you. The sessions being presented by David are as follow:


  • Customizing the Microsoft Dynamics GP Client with Visual Studio Tools, Dexterity and Modifier with VBA. Get an in-depth analysis of the various client-side customization tools for Microsoft Dynamics GP, including Modifier with Visual Basic for Applications, Dexterity, and Visual Studio Tools for Microsoft Dynamics GP. This session will help you understand how each of the tools can be used to create user-interface customizations as well as help you develop the ability to make sound decisions on the best tool for a particular purpose.


  • Troubleshooting Your Developed Solution. Do you know the vital development considerations necessary for effectively troubleshooting a packaged solution? Learn them and much more! David will highlight best practices, illustrate real-world examples, and provide and discuss requirements for the Certified for Microsoft Dynamics program. Plus, he will show how the Support Debugging Tool for Microsoft Dynamics GP can be used to help with both development and system administration.

Hopefully, everything can be sorted out as it will be my honor to co-present with David.

Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/

Monday, August 17, 2009

VBA - Creating a keyboard shortcut for a Microsoft Dynamics GP window expansion button

Well, I had been absent (more like out of ideas) from writing any new VBA articles. The truth is, they are hard to come by without giving away too many secrets. :-)

However, this one is worth giving away as I have seen many users request this feature to speed up data entry and processing. Take for example the Purchase Order Entry window. Won't you just like the ability to press some combination of keys on your keyboard to quickly access the Vendor Detail Entry window where you can quickly change around shipping methods, or other information needed? Well this example shows just that, but can be used to add shortcuts to any other button control in any other Dynamics GP window.

The solution is simple:

1) Add a pixel size button to the window with Modifier.




2) Caption the button. Buttons can have captions preceeded with the ampersand ("&") character, which in turn acts like a shortcut when used in combination with the Alt key on the keyboard.



As a personal choice, I captioned the button with &4, as the expansion button is Expansion Button 4.

3) In addition, we can change the button's Visual properties to blend it in with the expansion button. I particularly prefer to stack these shortcut buttons on top of or next to the expansion button they will serve as a shortcut for.



4) The button can then be added to VBA where code can be written to force the execution the expansion button Change script. To run the Expansion Button 4 change script that will open the window, we use the Dynamics Continuum Integration library and pass-through Dexterity Sanscript.


Private Sub 4_BeforeUserChanged(KeepFocus As Boolean, CancelLogic As Boolean)
Dim CompilerApp As Object
Dim CompilerMessage As String
Dim CompilerError As Integer
Dim Commands As String

' Create link without having reference marked
Set CompilerApp = CreateObject("Dynamics.Application")
Commands = ""
Commands = Commands & "run script 'Expansion Button 4' of window POP_PO_Entry of form POP_PO_Entry;"

' Execute SanScript
CompilerError = CompilerApp.ExecuteSanscript(Commands, CompilerMessage)
If CompilerError <> 0 Then
MsgBox CompilerMessage
End If
End Sub


The following -- and much simpler! -- code will also do the trick for you non-Dexterity developers:

Private Sub 4_BeforeUserChanged(KeepFocus As Boolean, CancelLogic As Boolean)
ExpansionButton4.Value = 1
End Sub

You will need to add the expansion button to VBA in addition to the pixel size button for the above code to work.

Very simple! Now when you go to the Purchase Order Entry screen, enter PO number and select a vendor, you can press Alt + 4 on the keyboard to open the associated window to the Vendor ID expansion button.

Hope you find this sample project useful.

Downloads

v10 - Sample Expansion Button shortcut package file - click here.

Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/

US Payroll Tax Update Rounds

Having a tough time correlating the Last Tax Update date with the actual Payroll Tax Round number released by Microsoft?

Setup > System > Payroll > Payroll Tax
Sweat it no more! The following is a list of payroll tax round numbers with their corresponding dates:

Round 7 - Last Tax Update 7/3/2009
Round 6 - Last Tax Update 6/22/2009
Round 5 - Last Tax Update 4/27/2009
Round 4 - Last Tax Update 3/23/2009
Round 3 - Last Tax update 2/26/2009
Round 2 - Last Tax Update 1/21/2009
Round 1 - Last Tax Update 12/19/2008

Remember, you can always use the automated tax update feature in Microsoft Dynamics GP to get the latest tax updates.

1) Go to MSDGP > Maintenance > US Payroll Updates > Check for Tax Updates, and choose the Automatic update mode from the wizard.


2) Enter your company Authorization Number (usually your main phone number) to continue.



Click on the Log in button to continue. Dynamics GP will then download the latest tax update and apply the latest fixes required to fix bugs found in processing of payroll taxes.

Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com

Wednesday, August 12, 2009

Color coding Integration Manager scripts

Ok, so this is not currently possible [Ed: with version 10.0. This functionality was previously available with IM version 9], but won't it be great if it were? :-))

This question came up in the Dynamics GP Developers' newsgroup just a couple days aback and while the developer was sure of seing this at one of his clients, I assured him that Integration Manager did not have the capability of color coding the script, which is very standard stuff in other script editors and development environments, take for example Dynamics GP VBA code editor.

The above image is simulated and not an actual capability of Integration Manager

Nonetheless, I explained to the developer that I use other tools like VbsEdit to provide script color coding and some debugging capabilities. Except for native Integration Manager objects, VbsEdit is capable of color coding keywords, numbers, strings, etc., and provide line numbering which facilitates code readability and troubleshooting. Did I mention the ability to insert code breakpoints and the more than 200 sample scripts provided?

So the next time you are struggling with VBScripting within Integration Manager, consider giving VbsEdit a shot. You may also want to look into Notepad++ which offers similar features.

Finally as I may be wrong and since nothing is set in stone, if you have been able to enable script color coding in Integration Manager's Script Editor please post back with how you did it.

Until next post,

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/

Microsoft Dynamics GP network data encryption

If your organization happens to be PCI-compliant you are already too familiar with the data encryption requirements imposed by the financial institutions you currently deal with.

As part of your certification and compliance process, you probably had to find a way to encrypt customer and credit card data traveling between your organization and the credit card processor. This means you had to enable SSL encryption on your servers all the while obtaining a certificate issued by a certificate authority.

But what about your customer data traveling between your SQL Server and your Microsoft Dynamics GP client, and viceversa.

Here are three methods to encrypt Dynamics GP data traveling over the network:

1) You can enable strong data encryption at the DSN level if using a Microsoft SQL Server Native Client DSN to connect to your Dynamics GP databases on a Microsoft SQL Server 2005 or Microsoft SQL Server 2008 database server. To enable encryption, check the Use Strong Data Encryption option on the 4th dialog page, as shown below.



If using this option, you will want to make sure it's enabled on all workstations, and provide a centralize way to administrate it, for example, via the Group Policy Data Sources preferences extension.

2) To encrypt data traveling from clients to server, you can use Microsoft SQL Server Configuration Manager to configure the SQL Server Native Client protocols used to communicate to the SQL Server Database Engine.



The Force protocol encryption option will request a connection using SSL.

When Trust Server Certificate is set to No, the client process attempts to validate the server certificate. The client and server must have each have a certificate issues from a public certification authority. If the certificate is not present on the client computer, or if the validation of the certificate fails, the connection is terminated.

When set to Yes, the client does not validate the server certificate, thereby enabling the use of a self-signed certificate.

Trust Server Certificate is only available if Force protocol encryption is set to Yes (See method 3).

3) You can use Microsoft SQL Server Configuration Manager to setup a server side certificate, preferrably issued by a certificate authority. To encrypt connections, you should provision the SQL Server Database Engine with a certificate. If a certificate is not installed, SQL Server will generate a self-signed certificate when the instance is started. This self-signed certificate can be used instead of a certificate from a trusted certificate authority, but it does not provide authentication or non-repudiation.



NOTE: Secure Sockets Layer (SSL) connections encrypted using a self-signed certificate do not provide strong security. They are susceptible to man-in-the-middle attacks. You should not rely on SSL using self-signed certificates in a production environment or on servers that are connected to the Internet.

The login process is always encrypted. When Force Encryption is set to Yes, all client/server communication is encrypted, and clients connecting to the Database Engine must be configured to trust the root authority of the server certificate.

While your organization may not necessarily be seeking PCI-compliance, having strong data encryption for your accounting data is just another way to position your company with customers and vendors.

Related Articles

Encryption Connections to SQL Server - Microsoft SQL Server Books Online.
How to: Enable Encrypted Connections to the Database Engine (SQL Server Configuration Manager) - Microsoft SQL Server Books Online.

Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com

Tuesday, August 11, 2009

Fixing Microsoft Dynamics GP Toolbar erratic behavior

A few months aback, I blogged about a case where the Microsoft Dynamics GP toolbar menu would reorganized itself erratically even with the Lock Toolbar option activated. Back then, I alluded to the Script Debugging Tool being activated via the DEX.INI. Since then, I have also found that this may (or may not) be the case when returning from Modifier or Report Writer.

If you do happen to experience this issue and do not use the Script Debugging Tool, you can run the following T-SQL script in SQL Server Management Studio to correct the problem:


USE DYNAMICS;
GO

UPDATE SY07121
SET Visible = 0, ROWNMBR = 1, RowSequence = 1
WHERE CmdBarDictID = 3830
AND CmdBarFormID = 22006
AND CmdBarWindowID = 22003
AND USERID <> ''


UPDATE SY07121
SET Visible = 1, ROWNMBR = 1, RowSequence = 4
WHERE CmdBarDictID = 0
AND CmdBarFormID = 1568
AND CmdBarWindowID = 294
AND USERID <> ''


UPDATE SY07121
SET Visible = 1, ROWNMBR = 1, RowSequence = 3
WHERE CmdBarDictID = 0
AND CmdBarFormID = 1568
AND CmdBarWindowID = 295
AND USERID <> ''


UPDATE SY07121
SET Visible = 0, ROWNMBR = 99, RowSequence = 0
WHERE CmdBarDictID = 0
AND CmdBarFormID = 1568
AND CmdBarWindowID = 231
AND USERID <> ''


UPDATE SY07121
SET Visible = 0, ROWNMBR = 99, RowSequence = 0
WHERE CmdBarDictID = 0
AND CmdBarFormID = 1568
AND CmdBarWindowID = 223
AND USERID <> ''


UPDATE SY07121
SET Visible = 0, ROWNMBR = 99, RowSequence = 0
WHERE CmdBarDictID = 0
AND CmdBarFormID = 1568
AND CmdBarWindowID = 230
AND USERID <> ''


UPDATE SY07121
SET Visible = 0, ROWNMBR = 99, RowSequence = 0
WHERE CmdBarDictID = 0
AND CmdBarFormID = 1568
AND CmdBarWindowID = 228
AND USERID <> ''


UPDATE SY07121
SET Visible = 0, ROWNMBR = 99, RowSequence = 0
WHERE CmdBarDictID = 0
AND CmdBarFormID = 1568
AND CmdBarWindowID = 225
AND USERID <> ''


UPDATE SY07121
SET Visible = 0, ROWNMBR = 99, RowSequence = 0
WHERE CmdBarDictID = 0
AND CmdBarFormID = 1568
AND CmdBarWindowID = 224
AND USERID <> ''


UPDATE SY07121
SET Visible = 0, ROWNMBR = 99, RowSequence = 0
WHERE CmdBarDictID = 0
AND CmdBarFormID = 1568
AND CmdBarWindowID = 226
AND USERID <> ''


UPDATE SY07121
SET Visible = 0, ROWNMBR = 99, RowSequence = 0
WHERE CmdBarDictID = 0
AND CmdBarFormID = 1568
AND CmdBarWindowID = 227
AND USERID <> ''


UPDATE SY07121
SET Visible = 0, ROWNMBR = 99, RowSequence = 0
WHERE CmdBarDictID = 0
AND CmdBarFormID = 1568
AND CmdBarWindowID = 192
AND USERID <> ''
GO

The above script is applicable ONLY to Microsoft Dynamics GP v10. Make a backup of your DYNAMICS database before executing this script.

If the above fails to correct the issue, then you will need to remove the records for the user in question:


USE DYNAMICS;
GO
DELETE FROM SY07121 WHERE USERID = 'theUserID';

The scripts were originally provided by Sarah Purdy on the Dynamics GP Partner Technical Community and must be executed without any users in the system.

Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/

Monday, August 10, 2009

Microsoft Dynamics GP v10 displays new OS compatibility badge!

It's official! A few days aback, I announced that Microsoft Dynamics GP v10 compatibility with Windows 7 and Windows 2008 was going to be made formal with the public availability of the RTM versions of Windows 7 and Windows Server 2008 R2 - click here for the article. Apparently, the Product Management team could not wait anymore and have decided to go public with the announcement.

If you go to v10's System Requirements page (CustomerSource, PartnerSource) you will now see that Windows 7 and Windows Server 2008 R2 are now a part of the client and server operating systems' compatibility list, respectively -- see pictures below.























The good news? You will not be required to install any new service packs or hotfixes! On the otherside, as mentioned in my previous post, v9 will remain compatible with the current OS platforms with no announcements made to support Windows 7 or Windows Server 2008 R2.

Word of caution: before planning to upgrade to Windows 7 and/or Window Server 2008 R2, check the System Requirements page for other product compatibility requirements. If you are using any third party product that interacts with the OS, such as special printing add-ons or bar code reader programs, check with the corresponding ISVs.

Congratulations to the Testing, Product Management, and Development teams for this accomplishment.

Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/

Friday, August 7, 2009

Getting Started with VST: WinForms and Controls - Part 2

Well, getting back on track with our series, today I will show you how to add the toolbar and status bar button controls in addition to adding the code that will allow our WinForm to be displayed as an menu option under the Additional menu on the Customer Maintenance window.

1) In the Toolbox window, choose Button



2) Click on the toolbar area of the window to place the button control. Then change the properties as indicated in the picture below:



Note that the ButtonType on dexButtonProvider property is implemented as part of the Microsoft Dexterity Shell assembly (Microsoft.Dexterity.Shell.dll). Also, note that when I set the value to ToolbarWithSeparator the button immediately acquired the "look and field" of a typical Dexterity toolbar button.

3) Now, let's add the image to the Ok button. To do this, we can click on the image property and select the picture resource that best suit our needs:



In this case, I selected the Toolbar_Post image in the Resources file. Now, you can choose to add the actual checkmark image as part of the existing resources, but that is not a topic of this article.

4) On your own, add the window help button and the window note present and window note absent buttons to the status bar. For these controls, you will want to change the ButtonType on dexButtonProvider property to StatusArea and remove clear the text in the Text property. Don't forget to stack the the note buttons! The final result should look like the picture below:



5) Now that we have finalized the window layout, let's add some code to create the equivalent of a Dexterity form trigger. This will create an Additional menu on the Customer Maintenance window, allowing us to open the form. In VST, Dexterity form triggers are known as Menu Handler events and need to be registered in the Initialize() method in the GPAddIn.cs class.

GPAddIn.cs

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Dexterity.Bridge;
using Microsoft.Dexterity.Applications;
using Microsoft.Dexterity.Applications.DynamicsDictionary;

namespace GPWinForm
{
public class GPAddIn : IDexterityAddIn
{
// Add a variable reference to the RM Customer Maintenance form
static RmCustomerMaintenanceForm CustomerMaintenanceForm = Dynamics.Forms.RmCustomerMaintenance;

// Keep a reference to the rmCustomerHobbies WinForm
static rmCustomerHobbies rmCustomerHobbiesForm;

public void Initialize()
{
CustomerMaintenanceForm.AddMenuHandler(OpenRMCustomerHobbies, "Customer Hobbies", "H");
}

static void OpenRMCustomerHobbies(object Sender, EventArgs e)
{
// check to make sure the form is not either empty or already created
if (rmCustomerHobbiesForm == null)
rmCustomerHobbiesForm = new rmCustomerHobbies();
else
if (rmCustomerHobbiesForm.Created == false)
rmCustomerHobbiesForm = new rmCustomerHobbies();

rmCustomerHobbiesForm.Show();
rmCustomerHobbiesForm.Activate();

}
}
}

A couple things to note. In this script, we added static references to the Customer Maintenance form and rmCustomerHobbies WinForm to facilitate interacting with these throughout our code:


// Add a variable reference to the RM Customer Maintenance form
static RmCustomerMaintenanceForm CustomerMaintenanceForm = Dynamics.Forms.RmCustomerMaintenance;

// Keep a reference to the rmCustomerHobbies WinForm
static rmCustomerHobbies rmCustomerHobbiesForm;

We also added the menu handler event to assist in displaying a menu option to call our WinForm from the Customer Maintenance window. The OpenRMCustomerHobbies event handler method is the equivalent of a trigger processing procedure in Dexterity:


CustomerMaintenanceForm.AddMenuHandler(OpenRMCustomerHobbies, "Customer Hobbies", "H");

In Dexterity, the open form statement does a few things: it opens the form, activates the form, and open the main window of that form, if the AutoOpen property of the window is set to True . In VST, we can accomplish the same in two steps, by invoking the Show() and Activate() class methods of the form object.


rmCustomerHobbiesForm.Show();
rmCustomerHobbiesForm.Activate();

With the instructions provided in Part 1 of the WinForms and Controls series, we can proceed to build and deploy our assembly (I did not change the assembly name for this project). Once you load GP, open the Customer Maintenance window (Cards > Sales > Customer) to test the solution. You should now see the Additional menu option, along with our Customer Hobbies entry.


If you select the option, you should now see our form. Granted, we haven't added any code to manage whether a record was selected or not prior to our form being opened, we did not add any code to preset the Customer ID and Customer Name fields on our WinForm based on the same field values on the Customer Maintenance window, and certainly have not added any code to retrieve or store data based on the selected customer. All this will be a part of our next article.

Downloads

GPWinForm solution - C# - Click here

Related Articles

Getting Started with VST: WinForms and Controls - Part 1
Getting started with VST: "Hello World!" - The Video
Getting started with VST: "Hello World!" project
Getting started with Visual Studio Tools for Microsoft Dynamics GP -- Adventures of a Microsoft Dexterity developer

Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/

Wednesday, August 5, 2009

Support Debugging Tool FAQs

I get asked almost on a daily basis what is Support Debugging Tool and how to get a hold of it. In addition, many partners have not ventured into using the tool at their customers, because they are unsure of the installation process, the footprint, or unaware that it's a free tool.

Now, David Musgrave over at Developing for Dynamics GP has channeled all those inquiries into a Frequently Asked Questions (FAQ) article. If you are a customer and want to take advantage of Support Debugging Tool, but you are unsure how to obtain it, this article is just right for you. If you are a partner trying to become familiar with the tool and the installation process, this article is also right for you.

If you are not using Support Debugging Tool, you are definitely making your support and troubleshooting efforts much more difficult than they should be.

Related Articles

For all Support Debugging Tool articles over at Developing for Dynamics GP, click here. For all SDT related articles on this site, click here.

Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com

Microsoft Dynamics GP compatible with Windows 7

The good news: Microsoft Dynamics GP v10 is now compatible with Windows 7, the bad news: Microsoft Dynamics GP v9 is not! The Dynamics GP Product Management & Marketing team has announced it on their blog, however, the official stand on the System Requirements page on CustomerSource and PartnerSource won't be until the Windows 7 RTM version is publicly available on October 22.


For those of you awaiting compatibility with Microsoft Windows Server 2008 R2, the Additional Information page also makes it clear that compatibility can be expected with the RTM version. However, this may be interpreted as testing has also been completed on the server operating system as well, but the team will hold off until the official RTM version is released.

I am not surprised if some of the delays on v10 Service Pack 4 obey to assuring compatibility with Windows 7 and Windows Server 2008 R2. After all, why release a Service Pack to then have to release a hotfix.

Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/

Monday, August 3, 2009

User date rollover message not displaying after mid night

Just recently on the Dynamics GP Partner forum, my friend Japheth Nolt reported that some workstations at one of his clients would not display the warning dialog "It's 12:00 a.m. Would you like the user date to change to ...?" after the system clock crossed the 11:59:59 PM barrier, and that this issue would cause some users to enter transactions with the wrong date. After all, transaction windows in GP default with the user date, not the system date.


Japheth had already inspected the DEX.INI looking for the SuppressChangeDateDialog, making sure the key was not set to True. This setting prevents the user date rollover message from being displayed and was designed to prevent integrations running around mid night from failing in response to the warning dialog.

In addition, there were no macros running around the mid night timeframe either. When a macro fires up, all timed events crossing paths with the executing macro are re-queued by the runtime engine.

The first step towards solving the problem was replicating the problem experienced by the users. So, this implies changing my system's date and time to 11:59 PM., and check the Process Monitor to verify the status of the smChangeDateTimedEvent script timed event.

I noticed that past mid night, the smChangeDateTimedEvent script would move to the bottom of the queue, just as it would if a macro was executing when the timed event needed to be fired.

Something else was happening. I realized the date of the Fabrikam company is set to April 12, 2017, a far cry from my system date. Following, I changed the system date to April 12, 2017, 11:59 PM. Once the system date was changed, I waited patiently until the clock hit mid night... Bingo! The warning showed up!

As it turns out, the Dexterity Sanscript code checks that the system date matches the user date plus 1 day, before the user date is changed. Why? Since the Dynamics GP user date is managed by the user, the development team had to assume that if the user changed the user date, then the user wanted the date to remain in place regardless of any mid night change of date.

Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/