Search code examples
genexus

how to delete a record in transaction with sub-level using procedure in genexus


I tried to delete the records in Repair transaction using procedure but I'm getting an SQL error because it has a sub-level called Kind, here's the transaction structure: Repair Transaction

I also tried to delete the sub-level first before deleting the main-level but genexus can't detect that it's a transaction or transaction level.

How can I delete a record in transaction with sub-level using procedure in genexus?

Here's the code snippet with the error


Solution

  • Second For Each must be "Transaction.Level"

    Like this..

    For Each Repair 
       For Each Repair.Kind
          Delete
       EndFor
       Delete
    EndFor