RENAME prohibition

Hi All, how do I can forbid rename of the record from within a particular form? non-key values should remain able to be modified.

Renaming is not a field level change. Insted, renaming is done at the table level. When any value is changed in the Primary Key, the OnRename trigger will fire at the table level when the system attempts to write the changes. Below is a line of code as an example of how to prevent renameing. You also could do some kind of modification that would allow certain users permission while prohibiting others. A little more work but, probably worth it. Below is the code example for the OnRename Trigger: ERROR(‘You can not rename this record!’); Bill Benefiel Manager of Information Systems Overhead Door Company billb@ohdindy.com (317) 842-7444 ext 117

This might be a solution. On the table you do not want people to be able to rename, have a function that will set a boolean. SetRename(someBool) NoRename := someBool; OnRename()//of the table if NoRename then Error(‘You are not allowed to rename this record’); Then on certain forms you could simply put… OnAfterGetRecord() SetRename(true); Hope it helps. Taylor McCartney Development Specialist CSB Systems tmccartney@csbsystems.com

thanks :slight_smile: first solution is the only I need.