0

How do i create a record on a SubTable button?

 I have an Invoice table and Invoice Items is the subtable.

Im trying to add a button on Items to create an Invoice and a new record on the Subtable Invoice Items linked to the Item.

2 replies

null
    • Fred
    • 3 yrs ago
    • Reported - view

    Hi Julian -

     

    Since Items is a child of Invoice, it seems like doing data entry from your Invoice table would be the better place to start? On your Invoice table, when you click on a record you will see a view of your Invoice Items table with an Add Record button.

     

    If you really want to use a button from your Items table, you can do something like:

     

    let xCFT := (create FirstTable);
    let xCST := (create SecondTable);
    xCST.(FirstTable := xCFT)

     

    Line 1: creates a new record in FirstTable.

    Line 2: creates a new record in SecondTable (subtable of FirstTable)

    Line 3: links the new record in SecondTable with the newly created record in FirstTable

     

    But you will see that no other data in entered so there is a lot of back tracking to add data.

    • sebastian
    • 3 yrs ago
    • Reported - view

    Hi Julian,

    from where you want to copy the items to the Invoice items? If you have an invoice and as subtable (child) Invoice items, you add the items by clicking on add at the reference table which is the subtable. But if you have another table like for example a Project/Contact with its own subtable, say 'SC items' and you wan to copy them over by creating an Invoice with Invoice items you need to use the code with 'create'.

Content aside

  • 3 yrs agoLast active
  • 2Replies
  • 350Views