When you have finished coding the form factory, build the assembly. Resolve any build issues. The form assembly must be placed into the same location as Dynamics.exe so that it can be found. You must also add registration information to the Dynamics.exe.config file. This registration tells the runtime engine what forms/windows you have created a form factory for.
Open the Dynamics.exe.config file with a text editor such as Notepad. Add the entry to the <formFactories> section. Be aware that several entries already exist in this file. Don’t replace the file with a different copy. Edit the existing file instead, but use caution so that you don’t break the form factories for other applications. In the entry, specify the following:
A form can have only one form factory registered for it at a time.
The following example is the entry for the Dynamics.exe.config file that registers the form factory for use with the About Box form in Microsoft Dynamics GP. Notice how the product ID, form ID, and window ID are specified. Also notice how the factory type is specified, including the fully-qualified name of the form factory class.
<add name="AboutBoxExtension" productId="0" formId="1" windowId="1" factoryType="FormFactorySample.AboutBoxFormFactory,FormFactorySample" />
When you launch the application and open the form for which the form factory has been registered, the modified wrapper will display the additional controls you have added for the form. The following illustration shows the sample form factory created for the About Box in Microsoft Dynamics GP. It added a push button and a picture control to the form.