I am creating a customization Dexterity. I have a custom table "ZINT_EFTTX". I don't allow duplicates. I only have 1 key associated with the table (Chekbookid, batchsource, batchid)
I am checking and unchecking boxes in the Generate EFT Files Window/Form.
If the box is checked the records in the scrolling window is inserted into my custom table.
if the box is unchecked in the scrolling window, the records is deleted from my custom table.
When I check and uncheck each record individually, My table is updated and I don't receive any errors.
If I have 2 or more boxes checked. When I check them they insert without a problem.
If I then uncheck them, the first record is removed from my table properly.
If I uncheck the 2nd item I receive a message:
"Deleting record in table returns "A remove operation on table "ZINT_EFTTX" failed because the record could not be locked."
What do I need to correct below?
I will list my trigger proc below that are initialized in Startup script
{ZINT_COPYEFTBATCH}
l_result = Trigger_RegisterFocus(anonymous ('(L) EFT Status' of window GenerationScroll of form cmEFTGenerateFiles),
TRIGGER_FOCUS_CHANGE, TRIGGER_AFTER_ORIGINAL, script ZINT_COPYEFTBATCH,l_tag);
if l_result <> SY_NOERR then
warning "Procedure trigger registration failed. - ZINT_COPYEFTBATCH";
end if;
debug "Form Trigger ZINT_COPYEFTBATCH = " + str(l_tag);
-----------------------------------------------
My Procedure that is called
{ZINT_COPYEFTBATCH}
release table ZINT_EFTTX;
if ('(L) Status' of window GenerationScroll of form cmEFTGenerateFiles)="Marked" then {of form cmTransactionEFTBatch}
'Checkbook ID' of table ZINT_EFTTX = 'Checkbook ID' of window GenerationScroll of form cmEFTGenerateFiles;
'Batch Source' of table ZINT_EFTTX = 'Batch Source' of window GenerationScroll of form cmEFTGenerateFiles;
'Batch Number' of table ZINT_EFTTX = 'Batch Number' of window GenerationScroll of form cmEFTGenerateFiles;
'Batch Total' of table ZINT_EFTTX = 'Batch Total' of window GenerationScroll of form cmEFTGenerateFiles;
'Posted Date' of table ZINT_EFTTX = 'Posted Date' of window GenerationScroll of form cmEFTGenerateFiles;
'EFT Status' of table ZINT_EFTTX =1;
save table ZINT_EFTTX;
warning "Batch ID = " + 'Batch Number' of table ZINT_EFTTX + "Batch Source = " + 'Batch Source' of table ZINT_EFTTX + "Checkbook ID = "+'Checkbook ID' of table ZINT_EFTTX
+ "Batch Status = " + format('EFT Status' of table ZINT_EFTTX,true,true,0,MINUSNEG)
+ "Batch Total = "+ format('Batch Total' of table ZINT_EFTTX, true,true,2, MINUSNEG) ;
else
if 'Batch Source' of table ZINT_EFTTX= 'Batch Source' of window GenerationScroll of form cmEFTGenerateFiles then
change table ZINT_EFTTX;
remove table ZINT_EFTTX;
end if;
end if;