Options

Strange Problem with List Pages

deV.chdeV.ch Member Posts: 543
edited 2011-04-27 in NAV Three Tier
I have a strange problem with listpages that use Purchase Line as Source table. When i use that pagetype my RTC Client crashes without a a warinig or something, it just closes. It happens with the simplest possible page i can design. just 1 field, no code.

In the event log i get this message:
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>

What i already tried:
-Recompiling all objects
-removed object metadata entry
-removed & recreated the object
-used a new object (new number)
-Installed the latest hotfix
-restarted service tier

the strangest things are: it happens with standard page "Purchase Lines" too!, Pages of type "CardPart" work!

This happens on a virtual pc image, we used that source image for a long time now, and it worked fine up to now.

The database i work on, is a backup of our main database that we have on a server, if try to start the Page "Purchase Lines" there, it works fine!

any suggestions?

Answers

  • Options
    mihail_kolevmihail_kolev Member Posts: 379
    Is this migrated database? I had similar issue and the problem was in the keys of the table. After migration I had fields named "Posting date" and "_Posting date". So, after removing the key that contains the "_Posting Date" field my problem was solved.
    -Mihail- [MCTS]
  • Options
    deV.chdeV.ch Member Posts: 543
    No this database was build new on a 2009 version. There are no such keys.

    And the same "Purchase Line" Table Object works fine in another database, so the keys arn't a problem
  • Options
    deV.chdeV.ch Member Posts: 543
    :shock: I have to apologize, it actualy WAS a key! but I don't realy understand where the problem is with that key...
    [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:
  • Options
    mihail_kolevmihail_kolev Member Posts: 379
    Well, check it as Sloved. It's good to come back here, view your posts and remember what's the problem :mrgreen:
    -Mihail- [MCTS]
  • Options
    Erik_HeirbautErik_Heirbaut Member Posts: 16
    I had the same error!

    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!
Sign In or Register to comment.