I’m afraid this entire discussion is based on a false premise. There has never been any feature that prevents editing of a record, with the lockfields statement or any other way.
The lockfields statement did just what the name says – it prevented the editing of entire fields. Those fields would be “locked” for all records, not for an individual record. (Note that this use of the word “lock” is non-standard compared to all other uses of that term in Panorama, see my PS at the bottom of this post.)
This statement was a hack that I put together for the Track Magic project. Probably none of you remember that, but it was a tool written in Panorama to assist with working on Ruby on Rails. One component of Track Magic was that it allowed a Panorama database to be synchronized with an SQL Rails database. This required two extra fields in the database, which were managed by the Track Magic code. If the contents of these fields was changed manually, synchronization would be broken, so lockfields was implemented so that these fields could not be manually disturbed even if the data sheet was open. What I really wanted to do was add a field property that prevented the field from being edited in the data sheet. But the data structures in Panorama 6 made it nearly impossible to add a new field property, and since this was a small side project I came up with the relatively quick and dirty hack of the lockfields statement. If you read the old documentation you can see the compromises in this statement – most notably that it doesn’t account for changes in the database structure. The recommended use case was to use the .Initialize statement to set it up each time the database opens. The intent was that you would set it up once when the database opened, and never use this statement again unless you added or deleted a field, or rearranged fields. (If you did rearrange fields and didn’t use lockfields again, the wrong fields would be locked – as I said, it was a hack.)
The Track Magic project never went anywhere, so I didn’t need this feature any more. But I still thought it was a good idea, so in Panorama X I implemented it the correct way, as a field property. There’s no programming required, just un-check the Editable option.
This property can also be accessed and modified in code, using the EDITABLEINDATASHEET property.
Note that this option only affects the data sheet. The documentation for the old LockFields statement claims that it affects both the data sheet and forms, but I’m pretty sure that is a documentation error. Since this feature was really intended to permanently lock out a field, the thought was the the form would be designed to take care of that (either by not including the field or using a display object instead of an editor object).
Over the years, it has been suggested more than once that Panorama include a feature to make individual records non-editable. For example you might want to make it so that an invoice can’t be modified once it has been printed. However, this is a very tricky feature to implement and I’ve never really figured out a good way to do it. I understand the appeal of this concept, and if some point I figure out a reasonable way to implement it, I will do it.
P.S. The choice of the name lockfields was probably unfortunate. It probably should have been something like DisableEditingOfFields. Panorama (and other databases) already used the term “lock” for something else (preventing multiple users from editing the same data simultaneously), so this name choice could cause confusion, as it did today.