Getting the Table ID

sabzamsabzam Member Posts: 1,149
Which Function do i need to run to get the Table ID - i.e. the no.?

Comments

  • sabzamsabzam Member Posts: 1,149
    At last I've Managed to find it it's RecordID.TABLENO :D
  • sabzamsabzam Member Posts: 1,149
    Hi Everybody,

    I'm still finding trouble in using the table no function. Is it possible to get the RecId from a Record Type variable?
  • Johan_007Johan_007 Member Posts: 53
    what are you trying to do? :-k
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    sabzam wrote:
    I'm still finding trouble in using the table no function. Is it possible to get the RecId from a Record Type variable?
    If you create a variable with Record Type = Record, then you know the Table No. because you defined it a design time.

    Otherwise, you can use recVar.TABLENAME and lookup that TableName in the Object-table (is a system-table with No. 2000000001). There you have your Table No.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • garakgarak Member Posts: 3,263
    Name	DataType	Subtype	Length
    Item	Record	Item	
    Object	Record	Object	
    
    
    Object.reset;
    Object.setrange(Type,Object.Type::Table);
    Object.setrange(Name,Item.TABLENAME);
    Object.findfirst;
    message(format(Object.ID));
    
    Do you make it right, it works too!
  • garakgarak Member Posts: 3,263
    to slow :-(
    Do you make it right, it works too!
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    IM2FAST4U :lol:
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • garakgarak Member Posts: 3,263
    Good N8
    Do you make it right, it works too!
Sign In or Register to comment.