Not logged in - Login

Using a Modified Form in GP Customizations

The following illustrates how to use a modified form in customizations for GP.

Using DAG.exe

The first step is to use the Dictionary Assembly Generator (DAG.exe) to create a DLL contains the modified forms. This tool is installed with the 'VS Tools' for the version of GP that is being used.
  • Copy the DAG.exe file from the VS Tools installation directory to the GP directory.
    Typical VS Tool installation folder:
    C:\Program Files (x86)\Microsoft Dynamics\GP2018 VS Tools SDK

    Typical GP Installation folder:
    C:\Program Files (x86)\Microsoft Dynamics\GP2018

  • Create a batch file that changes directories to the GP folder and then runs the DAG.exe application. Sample batch file contents:

@rem change directory to the GP folder
cd "C:\Program Files (x86)\Microsoft Dynamics\GP2018"

@rem run the DAG utility
dag.exe 0 "DYNAMICS.SET" /F /N:Dynamics /O 

@rem pause so the user can see the output results before the window closes
@pause

  • Run the batch file as an administrator.
  • This will create the following files in the GP folder

Application.Dynamics.ModifiedForms.dll
Application.Dynamics.ModifiedForms.xml

Accessing the Modified Forms in C#

  • Copy the generated files to a location where the can be referenced by the GP AddIn project.
  • Add a reference to the DLL file to the project.
  • The following illustrates how to reference the standard and modified SOP Entry form. Note that the exact namespace path may differ slightly for different versions of GP.

// Reference the standard SOP Entry form
Microsoft.Dexterity.Applications.DynamicsDictionary.SopEntryForm sopEntry = 
   Microsoft.Dexterity.Applications.Dynamics.Forms.SopEntry;

// Reference the modified SOP Entry form
Microsoft.Dexterity.Applications.DynamicsModifiedDictionary.SopEntryForm sopEntryModified = 
   Microsoft.Dexterity.Applications.DynamicsModified.Forms.SopEntry;