One of the issues we started noticing with Web Client recently is, when you attempt to print a report - Standard or Template - but cancel out the printing on the Report Destination window, then attempt to print the report once more, we would receive the following Silverlight error message:
Severity: Critical Summary: A server side exception of type "ArgumentException" has occurred. Details: ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at Microsoft.Dynamics.GP.Web.Services.Runtime.Dexterity.Hierarchy`1.Add(T ancestor, T item) at Microsoft.Dynamics.GP.Web.Services.Runtime.Dexterity.Implementation.WCDexRuntimeStateResourceManager.Register(DexUri parentId, IWCDexWindow window) at Microsoft.Dynamics.GP.Web.Services.Runtime.Dexterity.Implementation.Adapters.WCDexFormOpenStateChangedNotificationAdapter.Notifications_FormOpenStateChanged(Object sender, DexUriEventArgs`1 e) at System.EventHandler`1.Invoke(Object sender, TEventArgs e) at Microsoft.Dexterity.Runtime.Interop.DexNotification.OnFormOpenStateChanged(DexUri uri, DexFormOpenState value) at Microsoft.Dexterity.Runtime.Interop.Win32.NativeMethods.MsaCommandExec(Int16 tag) at Microsoft.Dexterity.Runtime.Interop.Win32.NativeMethods.<>c__DisplayClass26.
at Microsoft.Dexterity.Runtime.Interop.Win32.NativeMethods.ExecuteMsaAction(Func`1 interopAction, String entryPoint)
at Microsoft.Dexterity.Runtime.Interop.Win32.NativeMethods.MacroSystemCommandExecute(Int16 tag)
at Microsoft.Dexterity.Runtime.Interop.DexMacroSystem.CommandExecute(Int16 tag)
at Microsoft.Dynamics.GP.Web.Services.Runtime.Dexterity.Implementation.WCDexMessageProcessor.ProcessCommandExecuteInstanceResourceMessage(IWCDexMessage msg)
at Microsoft.Dynamics.GP.Web.Services.Runtime.Dexterity.Implementation.WCDexMessageProcessor.Process(IWCDexMessage message)
at Microsoft.Dynamics.GP.Web.Services.Runtime.Dexterity.DexRuntimeStateManager.SendMessage(IWCDexMessage message)
This particular error was received attempting to print a sales order processing quote, but we have been able to reproduce from other windows. While I don't claim to understand all these exceptions, this particular one seems to refer to an issue caused by a "key" being added twice to the same "Generic.Dictionary" collection. Since the action causing the error seems to be a second attempt at printing a report - the same report it seems - somewhere along the lines it would appear that some value isn't being cleared out from the collection of reports being printed which would cause a duplicate key. Again, pure speculation.
Nonetheless, in speaking to the Dynamics GP development team, it seems to be this issue has been written up and may be solved in the upcoming hotfix release. This issue can be reproduced in Microsoft Dynamics GP 2015 build 14.00.0619 (January Hotfix).
Until next post!
Mariano Gomez, MVP
Intelligent Partnerships, LLC