RE: Howto code ComandButton clicked Method in List page's action pane (to stop production jobs registration)
It's needed so that the form will get an up-to-date record (that your code manipulated).
If the record is not up to date, you will get an error if you try to update something on the form (like you noticed).
This mechanism exists to prevent users and processes from accidentally overwriting each other's changes in the records.
Here's how it works:
1) When open the form, records are loaded from the database and stored in the client. Each record contains RecVersion field.
2) While the form is open, your button changes a record. This update changes RecVersion of the record in the database
3) Now if you try to change the same record on the form, the client notices that RecVersion of the record that is being saved, and RecVersion in the database are not the same. This means that someone else changed the record, and if your save would be succesful it would overwrite those changes. Even if you change only field A, actually the whole record with all field values is always saved, so if any other field was changed by that other process, those changes would disappear when you save your (outdated) record.
4) With refresh/research, latest version is fetched from the database, and you are now working with the latest version