VBA - Adding Fields to VBA stops working

David MeegoWhile working with Microsoft Dynamics GP v9.00, I have seen a situation where adding fields to VBA does not work anymore.  You can add windows and reports, but when adding a field they don't show up on the project.

If you try to import a package file with with a customsation using Customisation Maintenance you will receive a "Component Write Exception" error and the VBA part of the code will have not imported correctly.

I am not sure exactly what is going wrong and it is difficult to reproduce this issue on demand.  This probably explains why it has not been fixed yet.  It does not seem to happen with v8.00 or v10.00.

The only solution I know to resolve this is to export all the customisations as packages using Tools >> Customise >> Customisation Maintenance.  Then you can rename all the custom forms and reports dictionaries and the *.vba files to remove all the customisations. Then you can import the customisations back using the previously exported packages.

Hints:

  • Import reference packages before importing other packages to avoid referencing errors.
  • If you made format, string or message changes they will need to be remade as they are not included with packages.  Record a macro of these changes if you want to be able to remake them on demand. For more information see Formats Not Exported to .Package Files (KB 851092) Secure Link.

Post a comment if this has happened to you, especially if you know how to consistently reproduce the issue.

David