Running dag.exe on 9.0 Dynamics forms dictionary fails with runtime error at 86% complete

trick Roth - Click for blog homepageThis is a reposting of an article trick Roth originally wrote on my Developing for Dynamics GP blog.

A few months ago, a partner was attempting to create an Application.Dynamics.ModifiedForms.dll using the Dictionary Application Generator (dag.exe) against his 9.0 SP4 Dynamics forms dictionary.

This failed for him.  Trying to determine if it was a “forms dictionary issue” or not, he renamed his Application.Dynamics.dll as a test and attempted to generate a new one using Dag.exe.  This also failed in the same manner but at a different spot.

The partner logged a support incident that I took and after making sure that dag.exe ran successfully on my 9.0 SP2 system, I updated to 9.0 SP4 as well.  After doing so, I found I had the exact same issue.

So that was nice – at least I could replicate the issue.

What we found was that generating the modified forms assembly using the command line:

Dag.exe 0 /F

The Dag.exe would fail with a Microsoft Visual C++ runtime error at 86% complete.

If we renamed the Application.Dynamics.dll and attempted to generate it again with the command line:

Dag.exe 0 /M

Then the Dag.exe would fail with a Microsoft Visual C++ runtime error at 17% complete.

After spending a good time debugging this in Visual Studio 2005, I was able to determine what was happening.

Sometime after 9.0 SP2, two procedures were introduced into the Dynamics.dic.  These procedures used parameters that included two new fields.  Unfortunately however, the fields themselves were not included in the update cnk file.

While not causing any issues for the GP client – as I believe the new procedures would only be used for Latin American customers – the Dag.exe was finding the procedures and attempting to locate the new fields in the dictionary.  As they didn’t exist, the runtime crashes on the first one it couldn’t find.

While very unusual for support to do, the workaround was for me to make a cnk file that contains the missing fields that would merge into the Dynamics.dic.  After giving the cnk file to the partner and merging it into his Dynamics.dic, his dag.exe would run to completion successfully.

This issue is scheduled to be fixed in the next release – probably a tax release coming up.  In the meantime, if you run into this issue log a support case and mention that you need the file to resolve this issue.  Also make sure you give your exact dictionary version 9.0.352 or 9.0.371 as the cnk file will alter your Dynamics.dic and they need to be the same version.  As this is a bug, you won’t be charged for the case.

Hope this helps,
Developer Support

This article was originally posted on the Developing for Dynamics GP Blog and has been reposted on

Please post feedback or comments

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.