Microsoft Dynamics GP, the next generation of end-user customization tools?

September 9, 2011

My new article is out on my Community column blog, In my humble opinion with The Dynamics GP Blogster. This time, I take a swipe at some significant improvements that could be added to the customization and integration tools like Modifier, Report Writer, and Integration Manager, just by switching out the programming environment and scripting languages, Visuals Basic for Applications and VBScript for Visual Studio Tools for Applications and PowerShell, respectively.

Far fetched? Not quite, go on and read my reasoning behind this, over at the Community’s website.

Microsoft Dynamics GP, the next generation of end-user customization tools?

For more information on all the programming languages and environments, check the following links:

VBScript
   http://msdn.microsoft.com/en-us/library/cc175562(v=vs.90).aspx

Visual Basic for Applications
   http://support.microsoft.com/kb/163435

Visual Studio Tools for Applications 2.0
   http://msdn.microsoft.com/en-us/library/cc175562(v=vs.90).aspx

Scripting with Windows PowerShell
   http://technet.microsoft.com/en-us/scriptcenter/dd742419

Windows PowerShell Getting Started Guide
   http://msdn.microsoft.com/en-us/library/aa973757(v=vs.85).aspx

Modifier with VBA for Microsoft Dynamics GP 2010 Sample Applications
   http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=9304

Microsoft Dynamics GP 2010 Tools Documentation: Integration Manager
   http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=10955
Until next post!

MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/

Advertisements

Hybrid development for the Managed Code developer (cont.)

April 27, 2011

In my previous article I outlined a hybrid development approach for managed code developers that allows for a C# or VB.NET programmer to make use of Modifier and Dexterity as complements to deliver a solution – see Hybrid development for the Managed Code developer.

In summary, a managed code developer could leverage Modifier to effect changes on the core Microsoft Dynamics GP (or any add-on or third party product) user interface, then use Dexterity to create the table definitions and routines that will make those tables available on SQL Server – the added advantage? tables are exposed to Microsoft Dynamics GP security model and are created on the first launch of your dictionary and you can create an assembly for the dictionary to drive table operations from your Visual Studio Tools solution that will not require the use of ADO.NET or even the GPConnNet.DLL file to access the tables. Finally, your Visual Studio Tools code would be used to drive the user interface controls added with Modifier and the table operations (the glue to it all if you will).

In using this hybrid approach, there are a number of considerations for deployment:

The Modifier bit
To deliver the UI changes to your customer, you will need to export a package file – using the Customization Maintenance window – that contains only the modified resource. Since it’s possible to have VBA code with your UI changes, you may also need to export any references.

As best practice, export any references as a separate package as they may already be loaded in your customer’s environment.

Since you also had to create an assembly for the modified forms dictionary (FORMS.DIC) using the Dictionary Assembly Generator tool (DAG), you need to include the Applications.Dynamics.ModifiedForms.DLL file with your package.

Note: as a best practice, you should generate a modified forms assembly using the actual forms dictionary from your client’s environment, plus your UI changes. This will prevent any incompatibility with existing forms customizations when deploying the assembly in their environment. On the flip side, some developers prefer to DAG the clients FORMS.DIC dictionary file on site after the package file has been imported. This may still require to change the references within your existing Visual Studio project to use the modified forms assembly and recompile to create your final DLL.

Deliverable work products from this section:

  • Package File with UI customizations
  • Applications.Dynamics.ModifiedForms.DLL

The Dexterity bit
Since you created a Dexterity dictionary to deliver the table implementation (and any other bit you may have needed to facilitate your development project) you will now have to follow the conventional chunking process for your Dexterity application, YourPROD.CNK.

In addition, you would have needed to create an assembly for your Dexterity dictionary to reference in your Visual Studio Tools project using the DAG utility, yourCompany.YourProduct.DLL.

Deliverable work products from this section:

  • Chunk dictionary file with table creation/upgrade routines
  • yourCompany.YourProduct.DLL assembly file

The Visual Studio bit
As you are familiar with this process, suffice to say your actual VST project that serves as glue to the UI and table operations will need to be compiled into an assembly that will be deployed with the rest of components.

Deliverable work products from this section:

  • yourCompany.YourProduct.Extended.DLL assembly file

So in summary, you will be delivering 5 components with your application. While this may sound like a lot, it makes for a really slick solution. I want to hear from you about hybrid solutions you have created and how you have leveraged each tool.

Take a look at the following related articles for more information:

VST – Amount in Words on SOP Entry window
Developing Microsoft Dynamics GP hybrid integrating applications
Dex – How to get started with Dexterity over at Developing for Dynamics GP

Until next post!

MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/


Hybrid development for the Managed Code developer

April 25, 2011

A few weeks aback, I co-presented a deep dive session with my partner in crime, David Musgrave, at Microsoft Dynamics Convergence Atlanta 2011 DDGP03 Microsoft Dynamics GP Customization & Integration Tools Review – see Microsoft Dynamics Convergence Atlanta 2011: Day 3 for more on what happened that day.

During our session, we introduce a Visual Studio Tools sample that left a few managed code developers scratching their heads – a bit. The sample in question used Modifier, Dexterity, and Visual Studio Tools to provide a customization to the Vendor Maintenance window. So let’s break down the customization.

The Modifier bit

One of the limitations of Visual Studio Tools is that it cannot modify existing Microsoft Dynamics GP windows to incorporate new controls. In addition, if this particular window, the Vendor Maintenance window, was a third party dictionary resource, frankly, Dexterity won’t be the tool to modify the window either – Dexterity cannot modify third party dictionary resources.

In addition, sometimes the user requirements need the customization to be implemented on the same window where they conduct most of their work on, understandabily so, as this simplifies the navigation process. 

Vendor Maintenance with customizations

The only way to bridge the gap between the aforementioned tools limitations and the user requirements is to use the Modifier tool. Modifier will allow a developer to deliver the controls needed by the user within the desired window. In turn, by using Modifier, we are ensuring that the changes can be displayed to the user on an “as needed” basis through the implementation of standard Microsoft Dynamics GP security.

However, by adding the controls to the window, the information selected by the user still has nowhere (yet) to be stored.

The Dexterity bit

By using Dexterity, we can implement the table metadata information that will allow the data selected by the user from the newly added controls to be stored. This will require a brand new Dexterity dictionary to be created.

If you are a Visual Studio developer you may still be asking, why can’t I implement the table and storage mechanism in SQL directly. The answer? Of course you can! However, by using Dexterity, you are able to expose your table to Microsoft Dynamics GP security model as well as simplifying the calls by using standard range methods in Visual Studio Tools.

In addition, if you need to make special calls to existing Microsoft Dynamics GP programatic objects (functions, procedures, etc.) which may require you to create wrappers, you can do so from Dexterity and perform the calls from Visual Studio Tools.

xmpVendorMaster table definition

On a more mundane note, Dexterity will create the table auto procedures and automatically add the DEX_ROW_ID identity column that will allow the runtime engine to control row level locking for you. By implementing your table in Dexterity, you are also providing a failsafe mechanism against deploying incorrect table structures or a different version of the table. If you are familiar with Microsoft Dynamics GP, you will know that the SQL Server tables must strictly match the metadata definition stored in the dictionary.

However, we still don’t have a glue for the UI changes and table storage and retrieval – commonly known as CRUD operations.

The Visual Studio Tools bit
Because the UI does not know of the table or the table of the UI, you must now implement the Visual Studio Tools portion to attain the final pieces. But first, you must do a few things…
 
In order to expose the controls added with Modifier to your Visual Studio Tools project, you must create an assembly for the modified window. In order to do so, you must use the Dictionary Assembly Generator tool (DAG.EXE).
 
In addition, exposing the table you created in Dexterity will also require you to DAG your Dexterity dictionary. Once you have generated both assemblies, you can then reference them in your Visual Studio project.

Solution Explorer

Once you have the code necessary to drive the interface and store the data, you can then build your assembly. The overall architecture of this solution is as follow:
 

Customization Architecture

 
You can download the code for this sample by visiting the Convergence Atlanta 2011 materials post below:
 
Microsoft Dynamics Convergence Atlanta 2011: Presentation Materials

Tomorrow I will talk about how to deploy this solution.

Until next post!

MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/


>Customizations for the View Indented Bill (bmViewIndentedBillInquiry) window failing for GP 2010

March 29, 2011

>In the past days I had been helping a Microsoft partner and good friend of mine in migrating some Modifier with VBA customizations from Microsoft Dynamics GP version 9.0 to version 2010.  In doing so, we came across an issue with one of the modified objects that needed to be converted: the Inventory module’s View Indented Bill window.

View Indented Bill window – Original

The customization in question added a field to the View Indented Bill window to retrieve the quantity available for a given component item on a bill, as shown below:

View Indented Bill window – Modified

The rest of the customization included adding some VBA code to retrieve the quantity available for the component across all sites by using some simple ADO code. So far, good!

The error came into play when we attempted to print the Indented Bill Report, by clicking on the print button on the window.

Unhandled script exception error

After selecting the report type on the destination on the Report Destination window and clicking Ok to generate the actual report, Microsoft Dynamics GP was complaining about an Unhandled script exception an its inability to find script PrintTraverseCallback of form “[Not Found]”.

As every good developer would know, troubleshooting this issue meant:

a) Testing that the error did not happen with the original form. Checked!
b) Testing that modifying the form did not corrupt the forms dictionary file, FORMS.DIC. Not Checked!
c) Testing that adding VBA code did not introduce the error, Not Checked!

In cases b) and c) even after rebuilding the forms dictionary and removing the VBA code, the error still occurred, but for case a) the system printed the report without presenting the Unhandled script exception error.

So being the, ehem!, well connected guy I am, I decided to call my good friend [Name excluded to protect the innocent] over at Microsoft. A test was performed to modify the same window and grant security to the modified version of the window, then run the report. The results were the same – Unhandled script exception. Now I could confirm that this was in effect a bug.

The bug also causes the BM Bill of Materials report would also not print the indented bill as expected.

BM Bill of Materials printed from original View Indented Bill window

Now, here is the report printed from the modified window.

BM Bill of Materials printed from the modified View Indented Bill window

Consequently, a problem report has been written up for this to be addressed in the near future – hopefully quick enough for the affected client.

Until next post!

MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/


New Article on MSDynamicsWorld: "When It Comes to Customizations for Microsoft Dynamics GP, Which Tool Should You Rely On?"

July 16, 2010


“The term “customization” can mean different things to different people…”

My new article is out over at MSDynamicsWorld. This time, I go back to basics defining what is a customization and what tools are available to customize the Microsoft Dynamics GP user interface. This article is a good start if you are still trying to figure out your options for developing add-on solutions to Microsoft Dynamics GP. To read the full article, click here.

Until next post!

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


Microsoft Dynamics GP 2010 Technical Web Seminars

May 10, 2010

Prior to the Microsoft Dynamics GP Convergence 2010 event, I had been hard at work with my good friend David Musgrave, working on couple Live Meeting pre-recordings corresponding to the two sessions we co-presented at the Microsoft Dynamics GP Technical Conference 2009.

Now, these two Live Meetings have been made available to the partner community along with a number of other sessions presented at the Tech Conference, updated for Microsoft Dynamics GP 2010. Visit the following link to access all the presentations:

Microsoft Dynamics GP 2010 Technical Web Seminars (PartnerSource)

If you attended the Tech Conference, you may remember that David and I co-presented the following two sessions:

Microsoft Dynamics GP 2010: Customizing the Microsoft Dynamics GP 2010 Client with Visual Studio Tools, Dexterity and Modifier with VBA
(Microsoft Partner Learning Center)

Microsoft Dynamics GP 2010: Troubleshooting Your Developed Solution
(Microsoft Partner Learning Center)

Please be sure to check all these sessions out and update the surveys.

Until next post!

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


Changing the Hyperspace property for a lookup button added with Modifier

January 26, 2010

It sounds like some word out of Captain Kirk’s vocabulary, but for Dexterity developers Hyperspace is a well known property that allows a Dexterity-based application to run the change script for a push button, i.e., a lookup button, without moving the focus from the currently-selected field. For example, you won’t want the ‘Customer Number’ field on the Customer Maintenance window to execute it’s change script before you have selected a customer from the Customer Lookup window as the lookup button is clicked… that’s what Hyperspace does, it prevents such situations by keeping the focus on the ‘Customer Number’ field until a customer ID is returned from the lookup window into the field.

The problem is, this property is locked down for push button controls added with Modifier, and while you cannot edit the push button change script with Modifier, you may still want to trigger off such controls with Dexterity code. This is pretty common for customizations where you don’t want to create an alternate versions of a GP form, but require a control placed directly on the GP form in order to call your own Dexterity code (see my article Developing Microsoft Dynamics GP hybrid integrating applications).

So, here is the workaround for changing the Hyperspace property of a push button control added with Modifier:

1. Add the push button control to your Modified window. In my example I will be using the sopCustomerItemMnt form. The following illustrates the changes made:

2. Save your modified window and return to Microsoft Dynamics GP. Open the Customization Maintenance window and locate the sopCustomerItemMnt. Click the Export button to export the modified window to a package file. The following is the content of exported package file:

= Form	"sopCustomerItemMnt"
{
	Datatypes
	{
		Datatype	"Lookup"
		{
			Control	"PushButton"
			DefaultDown	"00000"
			DefaultMouseOver	"00000"
			DefaultUp	"00000"
			Prompt	""
			PromptDown	""
			PromptMouseOver	""
			StaticType	"Mixed"
			~ItemImages
			{
				PictItem	"00001"
				{
					Item	"Field_Lookup_PB_Up"
				}
			}
		}
		Datatype	"UPC_Code"
		{
			AllowOddLength	"false"
			Control	"String"
			Format	""
			KeyableLength	"31"
			StorageLength	"32"
		}
	}
	Fields
	{
		Field	"Lookup"
		{
			ArraySize	"0"
			Datatype	"(L) Lookup"
			LookupForm	""
			PhysicalName	""
		}
		Field	"UPC_Code"
		{
			ArraySize	"0"
			Datatype	"(L) UPC_Code"
			LookupForm	""
			PhysicalName	""
		}
	}
	Windows
	{
		= Window	"sopCustomerItemMnt"
		{
			Fields
			{
				WindowControl	"(L) Lookup"
				{
					Alignment	"center"
					Appearance	"2D Border"
					BackColor	"System - Button Face"
					Border	"true"
					ButtonStyle	"GraphicOnly"
					Cancel	"false"
					ControlType	"PushButton"
					Default	"false"
					Editable	"true"
					EndTransaction	"false"
					Field	"(L) Lookup"
					Font	"System (generic)"
					FontBold	"false"
					FontColor	"System - Button Text"
					FontItalic	"false"
					FontUnderline	"false"
					HyperSpace	"false"
					LinkedLookup	"10002"
					LinkedPrompt	"0"
					Pattern	"(none)"
					PatternColor	"White"
					PositionLeft	"567"
					PositionTop	"186"
					ResizeHoriz	"StayLeft"
					ResizeVert	"StayTop"
					SizeHeight	"20"
					SizeWidth	"18"
					TabStop	"true"
					Tag	"10003"
					Tooltip	""
					UseUniqueHelp	"true"
					Visible	"true"
					ZOrder	"81"
					Zoom	"false"
				}
				WindowControl	"(L) UPC_Code"
				{
					Alignment	"left"
					Appearance	"2D Border"
					AutoComplete	"false"
					AutoCopy	"false"
					BackColor	"System - Window Background"
					Border	"true"
					ControlType	"String"
					DisableLookup	"false"
					Editable	"true"
					Field	"(L) UPC_Code"
					Font	"System (generic)"
					FontBold	"false"
					FontColor	"System - Window Text"
					FontItalic	"false"
					FontUnderline	"false"
					LinkedFormat	"0"
					LinkedLookup	"0"
					LinkedPrompt	"10001"
					Password	"false"
					Pattern	"(none)"
					PatternColor	"White"
					PositionLeft	"408"
					PositionTop	"186"
					ReadingOrder	"LeftToRight"
					Required	"false"
					ResizeHoriz	"StayLeft"
					ResizeVert	"StayTop"
					SavedOnRestart	"false"
					SetChangeFlag	"true"
					SizeHeight	"20"
					SizeWidth	"160"
					TabStop	"true"
					Tag	"10002"
					Tooltip	""
					UseUniqueHelp	"true"
					Visible	"true"
					ZOrder	"80"
					Zoom	"false"
				}
				WindowPrompt	"10001"
				{
					Alignment	"left"
					Appearance	"3D Highlight"
					BackColor	"System - Button Face"
					Border	"true"
					Font	"System (generic)"
					FontBold	"false"
					FontColor	"System - Button Text"
					FontItalic	"false"
					FontUnderline	"false"
					Pattern	"(none)"
					PatternColor	"White"
					PositionLeft	"328"
					PositionTop	"186"
					ReadingOrder	"LeftToRight"
					ResizeHoriz	"StayLeft"
					ResizeVert	"StayTop"
					SizeHeight	"20"
					SizeWidth	"80"
					Text	"UPC Code"
					Visible	"true"
					ZOrder	"79"
					Zoom	"false"
				}
			}
			LastTag	"10003"
		}
	}
}

3.Perform a search for “Hyperspace”. Replace the property value from false to true. Save the package file. In the above sample package file content, I have highlighted the Hyperspace property in red.

4. Use the Customization Maintenance window to reimport the package file. This should be all! Now your lookup button’s hyperspace property is set to true.

Warning: this method of changing the Hyperspace property of a push button is not supported by Microsoft and must be performed by a developer who understands the implications.

Until next post!

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