I have a simple question, I don't know if It's possible.
In my class I have a some methods, In one in particular I create a record in LedgerJournalTable and save the table reference in global variable _createdLedgerJournalTable.
So, in another method called after there is the possibility that I delete my createdLedgerJournalTable just created.
LedgerJournalTable deletedLedgerJournalTable ;
ttsBegin;
select forUpdate LedgerJournalTable
where LedgerJournalTable .RecId == _createdLedgerJournalTable;
LedgerJournalTable .delete();
ttsCommit;
I know it's strange I can retrieve the Part Number of deleted records ?
Begin I delete teh record I can save the JournalNum and mark the number sequence is NOT used?
I have seen some examples of that is used mark the number sequence (example seen) , I can unlock the number sequence ?
Thanks in advice,
enjoy!
If at all possible, avoid creating the journal header if you do not need it. For example create it just before the first insert of the journal line. Test
if (!journalTable)
.You can achieve what specify by calling
newGetNum
with the second parameter _makeDecisionLater set to true. Then callnumberSeq.abort()
to abort the number generation ornumberSeq.use()
to mark used.This only works if in the same transaction scope as
newGetNum
and if the number sequence is continuous. if not, both calls are no-operations.