Microsoft Product Support

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg
Showing posts with label Visual Studio Tools. Show all posts
Showing posts with label Visual Studio Tools. Show all posts

Thursday, 5 December 2013

Visual Studio Tools for Microsoft Dynamics GP 2013 and Microsoft Visual Studio 2013

Posted on 02:00 by Unknown
A few weeks aback I talked about Updating your Visual Studio Tools for web client development environment and soon after I started receiving numerous emails from developers wanting to know if they could leverage the current Visual Studio Tools 2013 SP2 (VST) templates with Visual Studio 2013.  As of yet, Microsoft has not released Microsoft Dynamics GP Add-In and Microsoft Dynamics GP Web Client Add-In templates for Visual Studio 2013, but with the help of my good friend Michael Hammond, Sr. Engineering Lead at Microsoft I have instructions on how to move the current Visual Studio 2012 templates to Visual Studio 2013

1. Locate the current VST template folders under your Microsoft Visual Studio 2012 program files folder. These can usually be found as follows:

Visual C# templates folder
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\ProjectTemplates\CSharp\Dynamics GP

Visual Basic templates folder
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\ProjectTemplates\VisualBasic\Dynamics GP

2. Copy and paste the Dynamics GP folder from under the above folders to their corresponding Microsoft Visual Studio 2013 program files folder. These are consequently found at:

Visual C# templates folder
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\ProjectTemplates\CSharp

Visual Basic templates folder
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\ProjectTemplates\VisualBasic

3. Configure Microsoft Visual Studio 2013 to recognize the templates. Start a Command Prompt as an administrator and change directories to C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE. Once in the directory, you can type the following command to setup the Visual Studio 2013 environment:

Command Prompt

The setup process should take no more than a couple minutes. Once you finish, you can launch Visual Studio 2013 and click to create a project using the Dynamics GP templates installed.

Visual Studio 2013 with Dynamics GP templates
Now, the beauty of all this is I can focus on my Windows Store applications without losing track of my Dynamics GP apps - the beauty of having everything under one roof.

Until next post!

MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/
Read More
Posted in Functionality, Visual Studio Tools | No comments

Thursday, 3 October 2013

Microsoft Dexterity Training back by popular demand

Posted on 08:03 by Unknown
(C) Microsoft Corporation

You asked for it and we are responding to your request. Given the success of our past Microsoft Dexterity training roadshow, we are launching a new round of training sessions for 2014. This time, we have expanded the number of training offers to cover advanced Dexterity topics, and for the first time, we are introducing Visual Studio Tools for Dexterity developers (and .NET developers too).
  • DEX001: Microsoft Dexterity Fundamentals - classes in Atlanta, Miami, and Toronto
  • DEX002: Advanced Microsoft Dexterity Development - classes in Boston and Montreal
  • DEX003: Visual Studio Tools for Microsoft Dexterity Developers - classes in Las Vegas and Seattle.

Want to attend, but don't want to leave your offices? We will come to you. (*)

You can find all about each class offered on our training page. For more information, contact Chuck Boyles at +1 (678) 993-6971.

(*) Some restrictions apply.

Until next post!

MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/
Read More
Posted in Dexterity, Training, Visual Studio Tools | No comments

Monday, 9 September 2013

VST: Rendering WinForms in Microsoft Dynamics GP web client

Posted on 11:57 by Unknown
In my previous article I discussed applying Service Pack 2 to update your VST development environment. The SP2 update introduces the ability to render VST WinForms in the Web Client.

Background

Prior to the release of Microsoft Dynamics GP 2013 RTM, the application development and technical consulting communities got to preview the web client at the Microsoft Dynamics GP Technical Airlift 2012 in Fargo in a Web Client Jumpstart Training for partners. Following the training and attendance to some sessions, VST developers got the bad news: "Only Dexterity applications are fully compatible with the web client". That left a number of you with the proverbial (and probably literal) bad taste in the mouth and scrambling for answers. Microsoft came back with a consolation price announcement: "Only VST applications written without using WinForms will be supported in the web client". In retrospect, I feel the message could have been delivered differently, but I digress.

Fast forward to SP2 and Microsoft did what it does best: make things right! VST developers now have the ability to render WinForms in the web client... with a few caveats.

The Boring Theory

With the RTM release of Microsoft Dynamics GP 2013 web client, VST developers needed to make a slight change to the way assembly add-ins were exposed to the desktop client and/or web client. By default assemblies were not loaded by the Runtime Engine and Web Client Runtime engine. In contrast, VST assemblies placed under the traditional AddIns folder would load in the desktop client (Dexterity client) only.

Now, to have an integration load on the Microsoft Dynamics GP web client, you must add the SupportedDexPlatforms attribute to the class that implements the IDexterityAddIn interface to indicate that the integration works for the web client.

Once you have indicated what platform your application will be compatible with, it's time to address your WinForms. Microsoft has leveraged its rendering engine to support two different types of rendering for WinForms: dynamic and custom rendering.

To use dynamic rendering, your Visual Studio Tools form must use controls from the supported list. The following controls are automatically rendered:
  • Button
  • CheckBox
  • ComboBox
  • GroupBox
  • Label
  • ListBox
  • RadioButton
  • TextBox
If the WinForm uses controls that aren't included in this list, those controls won't be rendered on the form when it is displayed in the web client. In those cases, you must implement custom rendering.
 
Dynamic rendering is the simplest technique for implementing a Visual Studio Tools form that works on the Microsoft Dynamics GP web client. With dynamic rendering, the web client runtime does the necessary work to display the Visual Studio Tools form in the web client. It also handles the communication between the web client machine and the web client server.

To enable dynamic rendering for a form, the form must derive from DexUIForm class. You must add the WCCompliantWindow attribute to the class that defines the form. This attribute indicates that the form should be automatically rendered by the web client. If this attribute isn't found on the form, the form will not be displayed in the web client.

The fun part!

Let's take canned PostingSOPBatches2 example. The first task at hand is to determine what platform the VST application will support:


In the above, we have added the SupportedDexPlatforms attribute, which takes one parameter that indicates which platform or platforms are supported by the integration. In this example, the logical-or operation is used to indicate that both the desktop client and the web client are supported.

With the client defined, the next focus is on the WinForm itself.  The following is our WinForm layout:


Once you complete the layout of the form, double-click on it to open the associated code:



The WCCompliantWindow attribute takes one boolean parameter that indicates whether dynamic rendering is supported for the form.

That's it! Compile away and test, test, and test, your code to make sure it works and that no rendering issues occur. You should place the resulting assembly, in this case postingSopBatches2.dll and its config file in the AddIns folder under your Microsoft Dynamics GP 2013 root folder. Launch the Web Client and display the form. For this example, we have placed the form under the About Microsoft Dynamics GP box, but could have well written an event handler to display it under SOP Entry where it really belongs.


So what happens to things like grids and custom controls? Those will need to be rendered using Custom Rendering. In my next article I will discuss this method and some of the drawbacks you may face while doing so.

Thanks to Kevin Racer (Twitter: @kracer123) and Michael Hammond (Twitter: @mhamm_msft) for their valuable contributions to this article.
-//-

Remember, the best application development techniques usually involve a Hybrid Development approach. There's always a way to accomplish the end goal and ultimately, is up to you the developer to consider at all the options available.

Until next post!

MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/
Read More
Posted in C#, Dynamics GP 2013, Upgrades, VB.NET, Visual Studio Tools, Web Client | No comments

Friday, 6 September 2013

VST: Updating your Visual Studio Tools Web Client Development Environment

Posted on 05:54 by Unknown
Microsoft Dynamics GP 2013 SP2 (12.00.1482) introduced some really cool new updates to a lot of application components. Yesterday, for example, I talked about the SmartList Designer and how it really takes the SmartList experience to new heights.

Visual Studio Tools and Microsoft Dynamics GP 2013 SP2 introduce support for WinForms rendering on the Web Client - more of that in my next article, but before we get into the details, here's what you need to know to prep your development environment:

1. You must install Visual Studio Tools for Microsoft Dynamics GP Service Pack 2 in your system. The VST msi update can be found under MDGP2013_SP2_DVD_ENUS\Tools\SDK\VS Tools\Updates folder in the full DVD image available from CustomerSource or PartnerSource. This should bring the VST components to version 12.00.1488.00 while updating all templates in your Visual Studio development environment.

Visual Studio Tools SP2 build number check Control Panel | Programs

2. You must apply Microsoft Dynamics GP 2013 SP2, which in turn should upgrade the Web Client Runtime components on your session host machine(s). The Microsoft Dynamics GP 2013 SP build number is 12.00.1482 and the Web Client Runtime assemblies will be updated to version 1.0.170.0.

Web Client Runtime build number check under About Microsoft Dynamics GP | Additional | Web Client

NOTE: If you are, in addition, doing Dexterity development you must follow the procedures outlined in http://support.microsoft.com/kb/910527 to complete the update of your Dex application, since SP2 will also update the Dynamics dictionary.

3. Finally, you can upgrade the Web Client components themselves, by running the msi found under \MDGP2013_SP2_DVD_ENUS\AdProd\WebClient\Updates on the full DVD image on your IIS server. The Web Client components should be at version 1.0.516.0 after the update is completed.

Web Client build number check under Control Panel | Programs

If you are anything like me, all this stuff runs on your development laptop. However if you are a part of a dev team, you should determine where each of these components reside in your environment and update accordingly.

For more information on Microsoft Dynamics GP 2013 SP2 take a look at my article Microsoft Dynamics GP 2013 Service Pack 2 is now available.

For additional information on updating your Visual Studio Tools applications to Service Pack 2, you will want to follow instructions outlined in the Upgrading an Integration section of the Getting Started chapter of the Visual Studio Tools for Microsoft Dynamics GP content online at MSDN Library.

-//-

In my next article, I will talk about rendering Visual Studio Tools' WinForms in the Microsoft Dynamics GP Web Client.

Until next post!

MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/
Read More
Posted in Dynamics GP 2013, Upgrades, Visual Studio Tools, Web Client | No comments

Monday, 26 August 2013

Accessing Microsoft Dynamics GP Default Settings from Visual Studio Tools

Posted on 18:41 by Unknown
Rarely you will hear the Dex.ini file being called the Microsoft Dynamics GP defaults file. However, the Dex.ini contains keys (and their associated values) that define how Microsoft Dynamics GP behaves in some cases. For example, SQLLastUser=sa stores the login of the last user who accessed the system on that specific instance of Microsoft Dynamics GP, in this case, 'sa'. Likewise, AutoInstallChunks=TRUE, allows Microsoft Dynamics GP to bypass prompting the user for new code (chunk file) to be installed at the time of launching the application. There are other settings controlling how certain features behave.

You can find a list of Dex.ini settings here.

Recently, I was helping a good friend of mine up in Maine who attended my Dexterity class in Boston and this time he wanted to know how to read the path for the Microsoft Dynamics GP help file. Of course, there's a simple (predefined) method for this as my good friend Patrick Roth with the Escalation Engineering team in Fargo pointed out, if you are familiar with some of Microsoft Dynamics GP form procedures:

string strPath = "";
strPath = Dynamics.Forms.MainMenu.Functions.GetDynamicsHelpPath.Invoke();
MessageBox.Show(strPath);

So, let's assume you had no clue this function existed. How would you address this issue? Frankly, I can think of at least 3 ways to do this:

1) Using a hybrid method whereby you create a Dexterity dictionary to wrap the Defaults_Read() Dexterity sanScript function into a user-defined global function. This method presents a challenge as you need to use the Dictionary Assembly Generator (DAG.EXE) to create an assembly you can reference from your VST project. In addition, you may or may not want to add an entirely new dictionary into the picture, when delivering your final solution. However, in case you are interested, this is the implementation:


GetDexIniSetting function

For more information on developing hybrid applications with Dexterity and Visual Studio Tools take a look at my articles:

Developing Microsoft Dynamics GP hybrid integrating applications
Hybrid development for the Managed Code developer
Hybrid development for the Managed Code developer (cont.)

2) You could use the Continuum API from Visual Studio Tools to access the Defaults_Read() sanScript function. The Continuum API is the Component Object Model (COM) API that is available for Microsoft Dynamics GP. The Continuum API documentation is available for download here. In this method, all you have to do is add a reference to the interop.Dynamics.dll COM library, which hosts the Continuum API.

// Created by Mariano Gomez, MVP
// This code is licensed under the Creative Commons
// Attribution-NonCommercial-ShareAlike 3.0 Unported License.
// http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode

public string GetDexIniSetting(string searchKey)
{
ParameterHandlerClass myParamHandler = new ParameterHandlerClass();

try
{ Dynamics.Application gpApp = (Dynamics.Application)Activator.CreateInstance(Type.GetTypeFromProgID("Dynamics.Application"));
if (gpApp == null)
return "";
else
{
string passthrough_code = "";
string compile_err;
int error_code, result;

result = gpApp.SetParamHandler(myParamHandler);
myParamHandler.IN_Key = searchKey;

passthrough_code += "local boolean err_val;";
passthrough_code += "local string dex_key_val, dex_key;";
passthrough_code += @"err_val = OLE_GetProperty(""IN_Key"", dex_key); ";
passthrough_code += "dex_key_val = Defaults_Read(dex_key);";
passthrough_code += @"err_val = OLE_SetProperty(""OUT_KeyVal"", dex_key_val);";

gpApp.CurrentProductID = 0;

error_code = gpApp.ExecuteSanscript(passthrough_code, out compile_err);
return myParamHandler.OUT_KeyVal;
}
}
catch
{ MessageBox.Show("Failed to initialize gpApp");
return "";
}
}

public class ParameterHandlerClass
{
public string IN_Key { get; set; }
public string OUT_KeyVal { get; set; }
}

In the above code, we define a parameter handler class with couple properties for the key that will be read from the Dex.ini and the key value to be retrieved.

In our GetDexIniSettings method, we instantiate our class and use the Continuum SetParaHandler() method to load the IN_Key property value. We then setup our pass-through code and invoke sanScript's OLE_GetProperty() function to retrieve the value of the IN_Key from our VST application via some old fashioned OLE automation. The OLE_SetProperty() function then returns the value to our class property, OUT_KeyVal.

That's it!

3) The third method uses some classic C# reflection to get the path of the AddIns. It then converts this to the path of the Data folder and the dex.ini file, and then uses the Pinvoke() method to read the key in the dex.ini and return the value.

[DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
static extern uint GetPrivateProfileString(
string lpAppName,
string lpKeyName,
string lpDefault,
StringBuilder lpReturnedString,
uint nSize,
string lpFileName);

//get path which should be the addins folder
String strPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);

//look for \Addins path
if (strPath.EndsWith(@"\AddIns", true, System.Globalization.CultureInfo.InvariantCulture) == true)
{ //and if we find one replace with the data folder
strPath = strPath.Replace(@"\Addins", @"\Data\Dex.ini");
}
else
{ //if not in addins then we must be in the root GP folder (like GP 2013 does with GP addins) so tack on \Data
strPath = strPath + @"\Data\Dex.ini";
}

StringBuilder sb = new StringBuilder(100);
uint res = GetPrivateProfileString("General", "Pathname", "", sb, (uint)sb.Capacity, strPath);
MessageBox.Show(sb.ToString());

// Copyright © Microsoft Corporation. All Rights Reserved.
// This code released under the terms of the
// Microsoft Public License (MS-PL, http://opensource.org/licenses/ms-pl.html.)


The above method comes courtesy of my good friend Patrick Roth with the Escalation Engineering team at Microsoft.

All the above methods are generic in nature and can read more than just a specific key. It's good to know that there's more than one way to do things. If you are going all hybrid, there's a code for that! If you want to be self-contained, there's a code for that! If you want to deviate completely from sanScript because you hate it or don't know it, there's a code for that! Whatever route you choose it must work to your benefit.

As a good Australian friend of mine would say, "The right solution is the one that works!".

Until next post!

MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/
Read More
Posted in C#, Continuum, Dexterity, Visual Studio Tools | No comments

Friday, 9 September 2011

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

Posted on 14:52 by Unknown
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/
Read More
Posted in Integration Manager, Modifier, VBA, Visual Studio Tools | No comments

Wednesday, 27 April 2011

Hybrid development for the Managed Code developer (cont.)

Posted on 10:00 by Unknown
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/
Read More
Posted in Dexterity, Modifier, Visual Studio Tools | No comments

Monday, 25 April 2011

Hybrid development for the Managed Code developer

Posted on 16:42 by Unknown
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/
Read More
Posted in Dexterity, Modifier, Visual Studio Tools | No comments

Friday, 12 November 2010

How to change your Microsoft Dynamics GP 2010 Map Services

Posted on 15:17 by Unknown
In recent weeks, the newsgroups have been flooded with questions about the Bing Maps service not working at the street level for addresses in Microsoft Dynamics GP 2010 - see Microsoft Dynamics GP 2010 map buttons not drilling down to the street level. While this issue is slated to be fixed in Microsoft Dynamics GP 2010 Service Pack 2, the bottom line is, it has left a bit of a bad taste in users relying on this functionality.

In addition, some users have questioned whether they can use a map service of their choice. There are a few well known services out there, for example Yahoo! Maps, Google Maps, or even some region specific services like Australia's WhereIs.com.

The good news is the Microsoft Dynamics GP community is full of individuals who are willing to share their knowledge without any restrictions and my buddy Jon Eastman at Touchstone Group, a Microsoft partner in the United Kindom offers this Dexterity based solution.

The Dexterity solution implements an AFTER trigger on the FormatWebAddress() function of the of the syMapPoint form. The processing function, GenerateGoogleMapsURL(), overrides the formatted address returned by the FormatWebAddress() function based on the address parameters. The Google Maps URL is then masked with the correct parameters and returned by the function for Microsoft Dynamics GP call to the browser application.

GenerateGoogleMapsURL()
{ function GenerateGoogleMapsURL

Created by Jon Eastman, Touchstone Group
This code is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 2.5 Generic license.
}
function returns string sWebAddress;

in string sAddress;
in string sCity;
in string sState;
in string sZip;
in string sCountry;

sWebAddress = "http:\\maps.google.com\maps?q=" + FormatSegment(sAddress) of form syMapPoint +
"," + FormatSegment(sCity) of form syMapPoint +
"," + FormatSegment(sState) of form syMapPoint +
"," + FormatSegment(sZip) of form syMapPoint +
"," + FormatSegment(sCountry) of form syMapPoint;

Finally, we need to register our function trigger in the Startup script for the Runtime Engine to recognize our integrating solution event.

Startup
{ Startup
Created by Jon Eastman, Touchstone Group
This code is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 2.5 Generic license.
}
local integer l_result;

l_result = Trigger_RegisterFunction(function FormatWebAddress of form syMapPoint, TRIGGER_AFTER_ORIGINAL, function GenerateGoogleMapsURL);

So, I figured, this is way cool! So why not implement the Visual Studio Tools for Microsoft Dynamics GP version of it? This would give me a chance to showcase the new event registration methods for functions and procedures.

The following C# code shows the event registration using Visual Studio Tools, but this time using Yahoo! Maps:

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

namespace sampleMapService
{
public class GPAddIn : IDexterityAddIn
{
// IDexterityAddIn interface
SyMapPointForm mapService;

public void Initialize()
{
Dynamics.Forms.SyMapPoint.Functions.FormatWebAddress.InvokeAfterOriginal += new SyMapPointForm.FormatWebAddressFunction.InvokeEventHandler(FormatWebAddress_InvokeAfterOriginal);

}

void FormatWebAddress_InvokeAfterOriginal(object sender, SyMapPointForm.FormatWebAddressFunction.InvokeEventArgs e)
{
mapService = Dynamics.Forms.SyMapPoint;

e.result = "http:\\\\maps.yahoo.com\\map?q1=" + mapService.Functions.FormatSegment.Invoke(e.inParam1) +
"+" + mapService.Functions.FormatSegment.Invoke(e.inParam2) +
"+" + mapService.Functions.FormatSegment.Invoke(e.inParam3) +
"+" + mapService.Functions.FormatSegment.Invoke(e.inParam4) +
"+" + mapService.Functions.FormatSegment.Invoke(e.inParam5);

}
}
}

In the above code, we register an InvokeAfterOriginal event, which is very similar to the trigger registration created in Dexterity. Once the event is registered, the actual method, FormatWebAddress_InvokeAfterOriginal() is implemented by reformatting the web address using the event arguments passed by Microsoft Dynamics GP to our method.

Hope you find these two approaches useful. For more information on these development methods, please visit the Learning Resources page on this blog or visit Developing for Dynamics GP.

Downloads

VST Google Maps solution - Click here
VST Yahoo! Maps solution - Click here
VST Sample Map Service Source Code - Click here

Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/
Read More
Posted in C#, Code, Dexterity, Visual Studio 2008, Visual Studio Tools | No comments

Tuesday, 24 August 2010

Top 10 Microsoft Dynamics GP freebies

Posted on 18:50 by Unknown
With the amount of money customers pay for software and implementations nowadays, it only makes sense that they would want to maximize their investment. What better than free (as in no strings attached!) software that works as intended. Because of this, I have set out to compile a list of the top 10 free add-ons -- in no particular order -- that I would drop into ANY Microsoft Dynamics GP implementation, no questions asked!

1) Support Debugging Tool. Ok, so I am biased! I have talked about this product in two Microsoft conferences and to outright show how biased I am, I am also personal friends with the product's author, David Musgrave. SDT is a collection of some of the most powerful administrative tools for Microsoft Dynamics GP currently available from anywhere, with rich features like Resource Information, Security Profiler, Dictionary Control, SQL Execute, Runtime Execute, XML Import/Export and the even more powerful Advance Debugger mode. So, where can you download this product? The product is available from Microsoft. If you are customer you MUST request it from your Microsoft Partner, and no, you shouldn't need to pay for it. The product is available via PartnerSource. For more information on SDT, visit the Support Debugging Tool Portal page over at Developing for Dynamics GP.

2) VersionPro. I really like when someone can identify a problem and produce a simple, yet powerful solution. Are you currently having problems keeping tabs of all the dictionary product versions throughout your entire organization? Version Pro is an administrative tool designed to ease the hassles of maintaining workstations on your Dynamics GP network. It keeps track of each product you have installed at a system level – and takes the next step in ensuring that each and every workstation on your network is on the same version for every product. VersionPro is available from Rockton Software -- yes, Mark Rockwell and his crew -- and can be downloaded here.

3) Password Expiration Notice. How many times have you been frustrated by passwords expiring with no prior notification to you or your system administrator? While I have addressed this issue from a SQL Server perspective in my article Enforcing Password Policy with Microsoft Dynamics GP, my friend and fellow blogger Michael Johnson, the MBS Guru takes it a step forward by implementing a Visual Studio Tools customization to check up on expiring passwords. You can download Michael's solution here.

4) Dynamics GP Productivity Pack Add-on. Do you work all day long with customer records? Won't you like to be able to capture information much faster and visit the typical inquiry and transaction entry screens just from the Customer Maintenance window? Matt Landis and the folks over at Landis Computer have the answer. You can download Matt's Productivity Pack Add-On here.

5) DexSense. Are you a die hard Dexterity developer? Wish you could have IntelliSense embedded in Dexterity to speed up your product development cycle? Just a few weeks aback I posted a call to vote on IntelliSense for Dexterity, but the answer came from the community. Tim Gordon at Alpine Limited in South Africa worked tirelessly to produce a solid first approach to IntelliSense with the product now being featured by MVP Leslie Vail in her new round of Dexterity training here in the United States. Now you can download Tim's DexSense here.

6) SpellCheck for Dynamics GP. Who knew right? Tired of misspelling every word typed into those pesky note fields? SpellCheck for Dynamics GP provides spell-checking on any Note, Comment, Text or String field in GP and 3rd party products. SpellCheck can be attached to any text entry field in the application. This add-on is an essential tool for environments that rely heavily on the accuracy of every single word stored in their database. You can download SpellCheck here.

7) Menus for Visual Studio Tools. This is another great free add-on that allows the developer in you to place your WinForms on a standard Microsoft Dynamics GP menu. This gem is also created by Microsoft's David Musgrave. For more information and links to download Menus for Visual Studio Tools click here.

8) Purchasing Account Required. Missing an expense account on a purchase order line item can be just a bit as annoying as having to figure out which line was missed. Michael Johnson puts out another piece of code that takes the thinking out of entering POs by making the Purchase Order account required in the process of entering the order. As if it wasn't enough, you can download both the VBA and the VST versions of the customization here.

9) SmartSort.Perhaps you’ve already discovered that getting your hands on information inside of Microsoft Dynamics GP may not always be an easy proposition, despite the range of tools available. EthoTech SmartSort speeds up your inquiries — and your data entry — by eliminating as many as 3 mouse clicks per lookup. Now you can automatically sort lookup information in almost every conceivable way! Quickly find the information you need by customizing your own view based on built-in advanced sorting options or SmartList favorites. AND… you can use SmartSort with over 40 Microsoft Dynamics GP lookup windows. Download SmartSort here.

10) SOP Batch Split. I couldn't have wrapped up the list without one of my own. Ever wish you could segregate invoices that have been transferred from orders in the same batch? What if all you want to do is change the batch name for a few sales transactions? Now you can do this with the SOP Batch Split tool. SOP Batch Split is a free add-on that uses Modifier with VBA and T-SQL stored procedures to perform a SOP batch transfer and is available here.

If you enjoyed this list and would like to know about other free products or suggest your own please add a comment to this post.

Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/
Read More
Posted in Code, Community, Dexterity, Functionality, VBA, Visual Studio Tools | No comments

Friday, 16 July 2010

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

Posted on 06:54 by Unknown



"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/
Read More
Posted in Around the Blogosphere, Article, Dexterity, Modifier, Report Writer, VBA, Visual Studio Tools | No comments

Sunday, 9 May 2010

Microsoft Dynamics GP 2010 Technical Web Seminars

Posted on 17:00 by Unknown
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/
Read More
Posted in Dexterity, Modifier, Support Debugging Tool, Technical Conference, Training, VBA, Visual Studio Tools | No comments

Friday, 12 February 2010

VST - Modal Dialogs handling make their way out of VBA into VST

Posted on 19:35 by Unknown
Over at Developing for Dynamics GP, Patrick Roth has a new article describing the new Visual Studio Tools 2010 shiny features, in particular Modal Dialog handling, passing table buffers as parameters, and function and procedure notifications. Patrick also provides sample code showing how to respond to Modal Dialog events as well as code to display notifications.

For the most part, VST now behaves likes Dex so, don't complain and enjoy the new enhancements.

PS. Wait until you see the new Menus for Visual Studio Tools... sure not to dissapoint.

Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/
Read More
Posted in Around the Blogosphere, Menus for Visual Studio Tools, Visual Studio Tools | No comments
Older Posts Home
Subscribe to: Posts (Atom)

Popular Posts

  • The Dynamics GP Blogster's best articles of 2012
    It's that time of the year again! Time to say goodbye to the outgoing year, 2012, and receive the new one, 2013, making all sort of reso...
  • What's new in Microsoft Dexterity 11.0
    The excitement around Microsoft Dynamics GP 2010 could not be any higher. Traffic on my site has doubled since I began releasing informatio...
  • Vote for your 2012 GPUG All Star
    The time has come again to vote for the next year's GPUG All Star awards. Surprisingly, I have been nominated to this award along with f...
  • Running Windows 8.x Business Analyzer app on a laptop with SQL Reporting Services
    If you are a consultant, chances are you run your Microsoft Dynamics GP application demo environment on a laptop along with Microsoft SQL Se...
  • How to add a "Cover Letter" page to a Microsoft Dynamics GP Word Template document
    I wrote an article almost a year ago showing a simple technique to add a  Terms and Conditions page to a Microsoft Dynamics GP Word Templat...
  • "Unable to access SnapIn config data Store" accessing Web Management Console
    For quite some time I had been running into this error when attempting to access the Microsoft Dynamics GP 2013 Web Management Console appl...
  • Adding more comment lines to POP Purchase Orders
    Just recently, I was asked by a customer to address an issue with their line item comments truncating at 4 lines. In essence, the customer w...
  • Brian Meier talks Microsoft Dynamics GP Business Analyzer
    Business Analyzer is one of those products that I really dig: it's slick, it works, and it just makes life easier for executives and inf...
  • Microsoft SQL Server performance boosting settings for Microsoft Dynamics GP - Part 1
    Part 1 of 2 - Microsoft SQL Server performance boosting settings for Microsoft Dynamics GP. Disclaimer: this is not a "one-size-fits-al...
  • Resetting GP desktop position and size with the Support Debugging Tool
    Just recently I worked on an issue being experienced by several Microsoft Dynamics GP users in a Citrix environment. The users would report ...

Categories

  • Ad Campaigns
  • ADO
  • Adobe Acrobat
  • Analytical Accounting
  • Architecture
  • Around the Blogosphere
  • Article
  • Azure
  • Bank Reconciliation
  • Best of 2009
  • Best of Series
  • Best Practices
  • Bing Maps Enterprise
  • Books
  • Business Alerts
  • Business Analyzer
  • C#
  • Code
  • COM
  • Community
  • Compliance
  • Connect
  • Continuum
  • Convergence
  • Corporate Performance Management
  • CRM
  • Database Maintenance Utility
  • Decisions Conference
  • DEX.INI
  • DEXSQL
  • Dexterity
  • Discussions
  • Drill-Down Builder
  • Dynamics GP 10
  • Dynamics GP 11
  • Dynamics GP 12
  • Dynamics GP 2010
  • Dynamics GP 2010 R2
  • Dynamics GP 2013
  • eConnect
  • EFT
  • Electronic Banking
  • Encumbrance
  • Events
  • Extender
  • Field Services
  • Fixed Assets
  • Forecaster
  • From the Newsgroups
  • FRx
  • Functionality
  • General Ledger
  • GPUG
  • Home Page
  • Human Resources
  • Humor
  • IMHO
  • Installation
  • Integration
  • Integration Manager
  • Internet Explorer
  • Inventory
  • Kinnect
  • Maintenance
  • Management Reporter
  • Manufacturing
  • Menus for Visual Studio Tools
  • Microsoft Office
  • Modifier
  • Multicurrency Management
  • Multitenancy
  • MVP Summit
  • MVPs
  • Named Printers
  • Navigation Pane
  • Notes
  • ODBC
  • Office Web Components
  • OLE Container
  • Online Services
  • OpenXML
  • Partner Connections
  • Payables Management
  • Payroll
  • Performance
  • PO Commitments
  • Printer Compatibility
  • Product Feedback
  • Project Accounting
  • Purchasing
  • Receivables Management
  • RemoteApp
  • Report Writer
  • Reporting
  • Roadmap
  • SafePay
  • Sales Order Processing
  • Season Greetings
  • Security
  • Service Call Management
  • SharePoint
  • SmartList and SmartList Builder
  • SQL Reporting Services
  • SQL Scripting
  • SQL Server
  • Support Debugging Tool
  • Tax Updates
  • Technical Conference
  • The Partner Event
  • The Technology Corner
  • Training
  • Translation
  • Troubleshooting
  • Upgrades
  • VAT
  • VB.NET
  • VBA
  • VBScript
  • Visual Studio 2008
  • Visual Studio Tools
  • Web Client
  • Web Services
  • Windows 7
  • Windows 8
  • Word Templates
  • XBox
  • XBRL

Blog Archive

  • ▼  2013 (68)
    • ▼  December (2)
      • Visual Studio Tools for Microsoft Dynamics GP 2013...
      • Web Client Wednesday: Microsoft Dynamics GP on Azure
    • ►  November (8)
    • ►  October (5)
    • ►  September (5)
    • ►  August (3)
    • ►  July (8)
    • ►  June (5)
    • ►  May (5)
    • ►  April (2)
    • ►  March (11)
    • ►  February (6)
    • ►  January (8)
  • ►  2012 (101)
    • ►  December (8)
    • ►  November (6)
    • ►  October (15)
    • ►  September (16)
    • ►  August (9)
    • ►  July (4)
    • ►  June (4)
    • ►  May (6)
    • ►  April (4)
    • ►  March (11)
    • ►  February (4)
    • ►  January (14)
  • ►  2011 (158)
    • ►  December (7)
    • ►  November (17)
    • ►  October (7)
    • ►  September (8)
    • ►  August (8)
    • ►  July (12)
    • ►  June (12)
    • ►  May (13)
    • ►  April (23)
    • ►  March (21)
    • ►  February (10)
    • ►  January (20)
  • ►  2010 (168)
    • ►  December (15)
    • ►  November (11)
    • ►  October (12)
    • ►  September (24)
    • ►  August (13)
    • ►  July (12)
    • ►  June (8)
    • ►  May (17)
    • ►  April (14)
    • ►  March (9)
    • ►  February (16)
    • ►  January (17)
  • ►  2009 (5)
    • ►  December (5)
Powered by Blogger.

About Me

Unknown
View my complete profile