Is there a way to find table ID bas on tablename

ResenderResender Member Posts: 119
edited 2011-12-14 in Navision Attain
Hello,
I've gotten an intresting question, we got 2 tables with the same name, diffrent ID off couse.
We now are getting unexpected behavior from a codeunit that uses 1 of these 2. We suspect that the record variable is pointing to the wrong one.

When we look into the global/local variables we get offcourse the variable name, its type (Record) and its susbtype, I want to know if there's a way to determine what the ID is of the table in the subtype

Thank you

Comments

  • mohana_cse06mohana_cse06 Member Posts: 5,504
    Resender wrote:
    we got 2 tables with the same name, diffrent ID off couse.
    Is it in database?

    It wont allow you to have objects with same name..
  • ResenderResender Member Posts: 119
    And yet I'm seeing 2 tables with exactly the same name, they got a diffrent caption.
    A secondary problem is the mix between the use of the dutch or english names for tables by our people.
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    Resender wrote:
    And yet I'm seeing 2 tables with exactly the same name, they got a diffrent caption.
    What is the NAV version you are using? In the earlier NAV versions, it was possible to have 2 objects of the same type, with the same name. Why don't you add an "X" to one of the table names, and then see in your code which variable points to which table?
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • ResenderResender Member Posts: 119
    Using navision attain BE 3.60 (3.60)
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    When I open Table 3 in Design Mode, and save it with object number 50003 (without changing the name), I got this error in BE 3.60:

    "The object name already exists.
    Existing object: Table 3 Payment Terms
    New object: Table 50003 Payment Terms"

    So I'm unable to create 2 tables with the same name.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • einsTeIn.NETeinsTeIn.NET Member Posts: 1,050
    Maybe there's an additional blank space within the name of one Object or something like that.
    "Money is likewise the greatest chance and the greatest scourge of mankind."
Sign In or Register to comment.