Merge one record to another
1 static void LedgerReasonMerge(Args _args) 2 { 3 ReasonTable reasonTableDelete; 4 ReasonTable reasonTable; 5 ; 6 7 ttsBegin; 8 select firstOnly forUpdate reasonTableDelete 9 where reasonTableDelete.Reason == 'COUNTER'; 10 select firstOnly forUpdate reasonTable 11 where reasonTable.Reason == 'AUCTION'; 12 reasonTableDelete.merge(reasonTable); //merge table record 13 reasonTable.doUpdate(); 14 reasonTableDelete.doDelete(); 15 ttsCommit; 16 }