Hello,
I am having issues deleting a transaction on a screen when a user F4's out. This is basically a two step process, a user is asked to delete a specific record, then a new record is created. The problem is I need an undo statement in case the user does F4 when they only want to delete the old record and not create a new one. Doing this rolls back the delete transaction causing it to never happen. Is there a commit function that I can add to the delete statement so that happens immediately regardless of what the user does?
The code is like this:
repeat on endkey, undo leave:
if delete = yes
then do:
for each record exclusive-lock
where criteria:
delete record.
end.
end.
create new record.
update field. <--- this is where user F4's
end.
Thanks,
Matt
I am having issues deleting a transaction on a screen when a user F4's out. This is basically a two step process, a user is asked to delete a specific record, then a new record is created. The problem is I need an undo statement in case the user does F4 when they only want to delete the old record and not create a new one. Doing this rolls back the delete transaction causing it to never happen. Is there a commit function that I can add to the delete statement so that happens immediately regardless of what the user does?
The code is like this:
repeat on endkey, undo leave:
if delete = yes
then do:
for each record exclusive-lock
where criteria:
delete record.
end.
end.
create new record.
update field. <--- this is where user F4's
end.
Thanks,
Matt