Strange bug, can't open form, filter is to big for field

ResenderResender Member Posts: 119
edited 2012-04-10 in Navision Attain
Since this morning we're getting the following bug in our dev enviroment.
When we try to open customer card from main menu.
Strangebug.jpg
All sensitive info been blanked out
However when we go via the shipment card, which was made inhouse and lookup the client and select client card in the overview we get the card loaded.

The error states: 'The value in the filter '....' for field Customer number in table Customer Combination is to large for the field type. Type:Code10'

Comments

  • ResenderResender Member Posts: 119
    Can you translate the error?
    The error states: 'The value in the filter '....' for field Customer number in table Customer Combination is to large for the field type. Type:Code10'
  • mohana_cse06mohana_cse06 Member Posts: 5,504
    Did you try to debug the error?

    Is there any code in OnOpen form or OnAftergetrecord?
  • ResenderResender Member Posts: 119
    Did you try to debug the error?

    Is there any code in OnOpen form or OnAftergetrecord?
    We tried that first, but the error occured even before debugger started.
    There's code in those sections
    OnOpen
    ActivateFields;
    CheckBlocked;
    

    OnAftergetrecord
    SETRANGE("No.");
    CheckBlocked;
    

    ActivateFields;
    CurrForm.Contact.EDITABLE("Primary Contact No." = '');
    lrecUser.GET(USERID);
    CurrForm.Exported.EDITABLE(lrecUser."Wijzigen geëxporteerd");
    

    CheckBlocked
    IF Blocked = TRUE THEN BEGIN
      CurrForm.LabelBlokkering.VISIBLE := TRUE;
      CurrForm.TextBlokkering.VISIBLE := TRUE;
    END ELSE BEGIN
      CurrForm.LabelBlokkering.VISIBLE := FALSE;
      CurrForm.TextBlokkering.VISIBLE := FALSE;
    END;
    

    As myseriously as the error/bug appeared it seems to have dissapeared as well.
    We have performed no actions on the database on the form between posting first post and this one.
  • KYDutchieKYDutchie Member Posts: 345
    Hi,

    it looks like you are matching the customer number from the customer table to your "Klant Combinatie" table.
    Check the length for Customer No. in that "Klant combinatie" table. It should be 20 as the default length of the Customer."No." field is 20.
    And the error states it is only 10 characters long.

    I think that you are now for the first time assigning a customer."No." that is more then 10 Characters long.

    I hope this helps,

    Regards,

    Willy.
    Fostering a homeless, abused child is the hardest yet most rewarding thing I have ever done.
  • ResenderResender Member Posts: 119
    That was my first idea as well, since I was working on a dataport that involved Customer.
    But none of the data I used to test preliminary code had the data the error was showing.

    When we looked in the table and applied a filter with the values on the customer number nothing was returned.
    Also the error occurred when we called the form directly (with or without debugger) we would get the error, if we went to a shipment and
    called the customer card we didn't get the error.
    About an hour or so after the error no longer occurred, we had done nothing but look if there was a filter on somewhere, since only 3-4 people have access at any given time to the developers database and I was the only 1 working on it when it first occurred.

    My colleague says it might have been data corruption, but I don't accept that.
    That's like in the movie 'Hunt for Red October' where the computer for the sonar system,on board the USA sub Dallas, identifies the noise of the October's silent drive as magma displacement since it has no other explanation for the sound.

    There must be a logical explanation why it happened.
  • DenSterDenSter Member Posts: 8,307
    Resender wrote:
    That's like in the movie 'Hunt for Red October' where the computer for the sonar system,on board the USA sub Dallas, identifies the noise of the October's silent drive as magma displacement since it has no other explanation for the sound.
    :thumbsup: one of my favorite movies, I might actually watch it again this weekend :mrgreen:
    Resender wrote:
    There must be a logical explanation why it happened.
    That error message only comes up when a value is too big for the data type. Somewhere, a filter was being set with a value that was bigger than 10 characters, on a field that is 10 characters. You just need to find where, or not and move on because it's not happening anymore.
  • ResenderResender Member Posts: 119
    I still have it on vhs, I might try getting a dvd or blu-ray of the movie.
    Yeah, so we know the reason for the error, we know what tables and forms that we're suffering from the error.
    The only thing we don't know is why, but since it's no longer occurring I'm not going to search for a reason why and just going to file it under
    'Random circumstances', meaning we don't know the route but its been fixed.
Sign In or Register to comment.