For a better approach to holding a record for update across a converse, refer to the code in the following example.
customerRecord Customer;
savedRecord Customer;
updateComplete char(1) = "N";
// check that data has not changed during user think time
customerRecord.CustomerID = 1;
get customerRecord;
while (updateComplete == "N")
move customerRecord to savedRecord byName;
move customerRecord to custDetailForm byName;
converse custDetailForm;
// validate input data on custDetail form
// assuming validation passed, continue
get customerRecord forUpdate;
// check all fields in customerRecord to determine
// whether anything changed during user think time
if (customerRecord.field1 == savedRecord.field1
&& customerRecord.field2 == savedRecord.field2
...
&& customerRecord.fieldn == savedRecord.fieldn )
// if no changes, move changed data from form to customerRecord
replace customerRecord;
updateComplete = "Y";
else
// message to user that data was modified by someone else
end
end
record Customer type ...
field1 ...
field2 ...
...
fieldn ...
end