Hello, first of all, this is happening in a WebApp but the code should work in a desktop application. I have found a weird issue. I'm trying to delete and save some records inside a transaction and it isn't working at all. My code is something like this:
Code:
Integer i
String[] asMyArray
String sMyValue

Get LoadDataToArray to asMyArray
Get IDToUpdate to sMyValue

Begin_Transaction
    // First, we delete old records from the table (note: there is only one index with COLUMN1)
    Clear MY_TABLE
                                
    Move sMyValue to MY_TABLE.COLUMN1
                                
    Find ge MY_TABLE by Index.1

    While (Found and MY_TABLE.COLUMN1=sMyValue)
        Delete MY_TABLE 
        Find gt MY_TABLE by Index.1
    Loop
                                
    // The table is clean from those old records, now the new ones will be written
    For i from 0 to (SizeOfArray(asMyArray)-1)
        Clear MY_TABLE

        Move sMyValue to MY_TABLE.COLUMN1
        Move asMyArray[i] to MY_TABLE.COLUMN2
        SaveRecord MY_TABLE
    Loop
End_Transaction
This should delete old records and write new ones. Executing it will actually save the new records but the Delete statements are not executed, thus old records will still exist in the table. However, if I remove the Begin_Transaction and End_Transaction instructions, it will be executed successfully and the old records are removed.
Am I missing something or are Delete statements forbidden inside transactions? I haven't found anything related to this in the documentation.