Type: System.ArgumentException Message: An item with the same key has already been added. StackTrace: at Microsoft.Dynamics.Nav.Client.ExceptionHandler.<>c__DisplayClass2.<DoRethrowWithCatchException>b__0() at Microsoft.Dynamics.Nav.Client.ExceptionHandler.ExecuteAndCatchExceptions(Func`1 execute) at Microsoft.Dynamics.Nav.Client.ExceptionHandler.DoExecute(Func`1 execute) at Microsoft.Dynamics.Nav.Client.ExceptionHandler.DoRethrowWithCatchException(Exception exception) Source: Microsoft.Dynamics.Nav.Client ---------------------------------- Type: System.ArgumentException Message: An item with the same key has already been added. StackTrace: at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at Microsoft.Dynamics.Nav.Client.NavUI.Forms.Controls.NavFilterSummary.AddSorting(String caption, String name) at Microsoft.Dynamics.Nav.Client.NavUI.Forms.Controls.NavFilterControlAdapter.InitializeNativeControl(Object control) at Microsoft.Dynamics.Framework.UI.Windows.LogicalControlAdapter.get_NativeControl() at Microsoft.Dynamics.Framework.UI.Windows.LogicalControlAdapter.Build(Boolean childrenOnly) at Microsoft.Dynamics.Framework.UI.Windows.LogicalControlAdapter.Build(Boolean childrenOnly) at Microsoft.Dynamics.Framework.UI.Windows.ClientSessionBase.OnFormToShow(LogicalForm logicalFormToShow, LogicalControl originatingLogicalControl) at Microsoft.Dynamics.Framework.UI.WinForms.ClientSession.OnFormToShow(LogicalForm logicalFormToShow, LogicalControl originatingLogicalControl) at Microsoft.Dynamics.Framework.UI.Windows.ClientSessionBase.OnFormToShow(FormSessionEventArgs e) at Microsoft.Dynamics.Framework.UI.Windows.ClientSessionBase.FormToShow(Object sender, FormSessionEventArgs e) at Microsoft.Dynamics.Framework.UI.UISession.OnFormToShow(FormSessionEventArgs e) at Microsoft.Dynamics.Framework.UI.UISession.ShowForm(LogicalForm logicalForm, LogicalForm parentForm) at Microsoft.Dynamics.Framework.UI.LogicalForm.Show() at Microsoft.Dynamics.Nav.Client.FormActivator.RunPageInternal(ViewMode mode, Int32 formId, String personalizationId, Guid node, NavBookmark bookmark, UISession uiSession) at Microsoft.Dynamics.Nav.Client.FormActivator.RunPage(Int32 formId, String personalizationId, NavBookmark bookmark, ViewMode mode, Guid node) Source: mscorlib Ereignis-XML: <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> <System> <Provider Name="MicrosoftDynamicsNAVClient" /> <EventID Qualifiers="0">0</EventID> <Level>2</Level> <Task>0</Task> <Keywords>0x80000000000000</Keywords> <TimeCreated SystemTime="2010-10-21T05:57:42.000Z" /> <EventRecordID>2780</EventRecordID> <Channel>Application</Channel> <Computer>SW8N9SP1DEMO</Computer> <Security /> </System> <EventData> <Data>Type: System.ArgumentException Message: An item with the same key has already been added. StackTrace: at Microsoft.Dynamics.Nav.Client.ExceptionHandler.<>c__DisplayClass2.<DoRethrowWithCatchException>b__0() at Microsoft.Dynamics.Nav.Client.ExceptionHandler.ExecuteAndCatchExceptions(Func`1 execute) at Microsoft.Dynamics.Nav.Client.ExceptionHandler.DoExecute(Func`1 execute) at Microsoft.Dynamics.Nav.Client.ExceptionHandler.DoRethrowWithCatchException(Exception exception) Source: Microsoft.Dynamics.Nav.Client ---------------------------------- Type: System.ArgumentException Message: An item with the same key has already been added. StackTrace: at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at Microsoft.Dynamics.Nav.Client.NavUI.Forms.Controls.NavFilterSummary.AddSorting(String caption, String name) at Microsoft.Dynamics.Nav.Client.NavUI.Forms.Controls.NavFilterControlAdapter.InitializeNativeControl(Object control) at Microsoft.Dynamics.Framework.UI.Windows.LogicalControlAdapter.get_NativeControl() at Microsoft.Dynamics.Framework.UI.Windows.LogicalControlAdapter.Build(Boolean childrenOnly) at Microsoft.Dynamics.Framework.UI.Windows.LogicalControlAdapter.Build(Boolean childrenOnly) at Microsoft.Dynamics.Framework.UI.Windows.ClientSessionBase.OnFormToShow(LogicalForm logicalFormToShow, LogicalControl originatingLogicalControl) at Microsoft.Dynamics.Framework.UI.WinForms.ClientSession.OnFormToShow(LogicalForm logicalFormToShow, LogicalControl originatingLogicalControl) at Microsoft.Dynamics.Framework.UI.Windows.ClientSessionBase.OnFormToShow(FormSessionEventArgs e) at Microsoft.Dynamics.Framework.UI.Windows.ClientSessionBase.FormToShow(Object sender, FormSessionEventArgs e) at Microsoft.Dynamics.Framework.UI.UISession.OnFormToShow(FormSessionEventArgs e) at Microsoft.Dynamics.Framework.UI.UISession.ShowForm(LogicalForm logicalForm, LogicalForm parentForm) at Microsoft.Dynamics.Framework.UI.LogicalForm.Show() at Microsoft.Dynamics.Nav.Client.FormActivator.RunPageInternal(ViewMode mode, Int32 formId, String personalizationId, Guid node, NavBookmark bookmark, UISession uiSession) at Microsoft.Dynamics.Nav.Client.FormActivator.RunPage(Int32 formId, String personalizationId, NavBookmark bookmark, ViewMode mode, Guid node) Source: mscorlib </Data> </EventData> </Event>
Answers
And the same "Purchase Line" Table Object works fine in another database, so the keys arn't a problem
[Document Type,Purch. Order from SO-No.,Buy-from Vendor No.]
"Purch. Order from SO-No." is a field which referes to a Document No. of a Sales Order.
And why does it only happen in the VPC environment??
EDIT: Ok i solved the problem now, i had to change the key order now it works.... Idiotic, but it works...
:roll:
I have a field on the Customer table with a TableRelation to the Resource table (Code field).
That TableRelation has a WHERE Clause:
TableRelation: Resource.No. WHERE (Person Responsible=CONST(Yes))
The field "Person Responsible" on the Resource Table is a Flowfield.
This worked fine until this morning, but then at a certain moment we got the famous error :
Type: System.ArgumentException
Message: An item with the same key has already been added.
StackTrace:
at Microsoft.Dynamics.Nav.Client.ExceptionHandler.<>c__DisplayClass2.<DoRethrowWithCatchException>b__0()
at Microsoft.Dynamics.Nav.Client.ExceptionHandler.ExecuteAndCatchExceptions(Func`1 execute)
at Microsoft.Dynamics.Nav.Client.ExceptionHandler.DoExecute(Func`1 execute)
at Microsoft.Dynamics.Nav.Client.ExceptionHandler.DoRethrowWithCatchException(Exception exception)
Source: Microsoft.Dynamics.Nav.Client
What I did to solve the problem:
I have set the ValidateTableRelation and TestTableRelation of the field in the Customer table to No.
And this works...
](*,)
If someone can explain this to me? I'm curious!