Options

Insert Data to a Table by Only Knowing The Table ID

Dear All,

I am trying to insert a data to a table by only knowing the table ID. Let's say I have the number 18 at hand and I will do an insert to Customer table? Is it possible to reach the customer table and insert (or modify) data with only knowing the number 18?

Thanks,
Ararat

Best Answers

  • Options
    ararat85ararat85 Member Posts: 17
    Answer ✓
    Are you sure that inserting or modifying the data without knowing anything but a table number is a good idea?

    RecordRef allows you to manipulate data in a generic way. Use
    Recref.OPEN(18)
    
    and the Recrefpoints to table 18. After calling Recref.OPEN(18) subsequent call to Recref.FIND*, Recref.INSERT ,Recref.MODIFY etc will operate on table 18.


    Table ID is not the only data I have of course :)

    Thanks for the answer.

Answers

  • Options
    Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    Are you sure that inserting or modifying the data without knowing anything but a table number is a good idea?

    RecordRef allows you to manipulate data in a generic way. Use
    Recref.OPEN(18)
    
    and the Recrefpoints to table 18. After calling Recref.OPEN(18) subsequent call to Recref.FIND*, Recref.INSERT ,Recref.MODIFY etc will operate on table 18.


    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • Options
    ararat85ararat85 Member Posts: 17
    Answer ✓
    Are you sure that inserting or modifying the data without knowing anything but a table number is a good idea?

    RecordRef allows you to manipulate data in a generic way. Use
    Recref.OPEN(18)
    
    and the Recrefpoints to table 18. After calling Recref.OPEN(18) subsequent call to Recref.FIND*, Recref.INSERT ,Recref.MODIFY etc will operate on table 18.


    Table ID is not the only data I have of course :)

    Thanks for the answer.
Sign In or Register to comment.