A Guide to Modifying Third-Party Forms in Microsoft Dynamics GP

When developing integrations for Dynamics GP, there are times when you need to modify a form installed with a third-party add-on. This blog provides step-by-step instructions on how to do so.

First, use the Alternate/Modified Forms and Reports form in the Setup section of Tools. Ensure that the third-party form is selected.

Modifying Third-Party Forms in Microsoft Dynamics GP 1

Open the desired form. In this example, I have selected Item Maintenance. Click on Tools > Customize > Modify Current Window.

Modifying Third-Party Forms in Microsoft Dynamics GP

This will open the Window customization application.

Modifying Third-Party Forms in Microsoft Dynamics GP 3

Click New on the toolbar window. Enter the information below and click OK.

Modifying Third-Party Forms in Microsoft Dynamics GP 4

In this example we’re modifying a toolbar button. Change the Appearance and the Back Color to match the image below.

Modifying Third-Party Forms in Microsoft Dynamics GP 5

From the toolbar, drag the okButton to the toolbar of the form window. Then click on File > Microsoft Dynamics GP.

Launch Visual Studio and create a new Microsoft Dynamics GP Add-in project.

Modifying Third-Party Forms in Microsoft Dynamics GP 6

In the GPAddIn.cs file, begin instantiation of the Item Maintenance form. See below for an example.

Next we will look for our okButton that we have just added. Because we created a local object it will by default be named LocalOkButton. You will notice that IntelliSense is unable to find our okButton. The reason for this is that Visual Studio, and by extension, our project, does not know about the changes we made to the third-party form. This is for two reasons; first, Visual Studio does not know about the third-party dictionary at all, and second, it also does not know about our modified form.

Modifying Third-Party Forms in Microsoft Dynamics GP 7

The first thing we need to do to inform Visual Studio about our modified form, is to find the Application ID number for the third-party form in our Dynamics GP installation. To do this, open the Dynamics.set file in your GP 2013 installation directory. In my case, it was located at C:Program Files (x86)Microsoft DynamicsGP2013Dynamics.set. Find the application of the modified form. In our case we will select Multi-Entity Management (5147).

Modifying Third-Party Forms in Microsoft Dynamics GP 8

Next we have to create both an application and forms dictionary assembly for the third-party add-on.  To do this we will use dag.exe. DAG.exe will be located in the directory of the Visual Studio Tools for Dynamics GP installation directory. In my case the location was C:Program Files (x86)Microsoft DynamicsGP2013 VS Tools SDKdag.exe.

The first step is to create the application assembly. The syntax to do this is:

dag.exe /M

For example:

dag.exe 5147 “c:Program Files (x86)Microsoft DynamicsGP2013Dynamics.set” /M

Modifying Third-Party Forms in Microsoft Dynamics GP 9

When this process is completed you will find the assembly in the Visual Studio Tools for GP2013 SDK directory.

Modifying Third-Party Forms in Microsoft Dynamics GP 10

Now we must create an assembly of the modified forms. The syntax is nearly identical. You merely need to change the option flag at the end from /M to /F. The F indicated a Forms dictionary assembly.

Modifying Third-Party Forms in Microsoft Dynamics GP 11

The modified forms assembly will then be located in the Visual Studio Tools for GP2013 SDK directory.

Modifying Third-Party Forms in Microsoft Dynamics GP 12

Now return to the Visual Studio project and add references to the two newly created assemblies.

Modifying Third-Party Forms in Microsoft Dynamics GP_13

Now if you look for your button in the IntelliSense, you will find it as expected. From here you can add your desired functionality.

Modifying Third-Party Forms in Microsoft Dynamics GP 14

Please reach out if you have any questions or need additional information.

Written by:
Aaron Rumford, Business Intelligence Developer, FMT Consultants

Posted by: 

©
2023
 FMT Consultants
|
Privacy Policy
X
FMT

Contact Us

X
FMT

Newsletter Sign-up

menu linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram