I have the following code:
on write of so_mstr new new-so old old-so
do:
if new-so.so_cust <> old-so.so_cust
then display new-so.so_cust old-so.so_cust.
return error.
end.
for each so_mstr
where so_domain = "us1"
and so_nbr = "1000343" exclusive-lock:
update so_cust with frame a.
end.
--------
Say if so_cust was 1111 and I updated it to 1234. I cannot understand how it is that the return error keeps the value at 1111 if the value has been updated. I did not think return error had the ability.
on write of so_mstr new new-so old old-so
do:
if new-so.so_cust <> old-so.so_cust
then display new-so.so_cust old-so.so_cust.
return error.
end.
for each so_mstr
where so_domain = "us1"
and so_nbr = "1000343" exclusive-lock:
update so_cust with frame a.
end.
--------
Say if so_cust was 1111 and I updated it to 1234. I cannot understand how it is that the return error keeps the value at 1111 if the value has been updated. I did not think return error had the ability.