Turn off rename functionality in form

Is it possible to avoid (deny) rename via item form by property settings alone or does it require coding?? Kind regards Brian Christensen

Hi Brian The way using form properties is to set the property editable to No on the “No.” field on the form. Of course this will also prevent a user entering a new item number directly, but this is not a problem if you use a Number Series as it is possible to insert/delete new records using the tool bar icons or the function keys F3/F4. If you don’t use number series for Items well there has been a whole thread about having seperate forms for update and enquiry. Regards David

Hi

quote:


David If you don’t use number series for Items well there has been a whole thread about having seperate forms for update and enquiry.


We had solve a similar problem with two buttons on a form: field ‘No.’ editable = no button ‘New’ visible = true, button ‘Ready’ visible = false =>Push button ‘New’ field ‘No.’ editable = yes button ‘New’ visible = false button ‘Ready’ visible = true Now you can insert a new item no. =>Push button ‘Ready’ field ‘No.’ editable = no button ‘New’ visible = true button ‘Ready’ visible = false We use this simple method in all important forms. Not unimportant: you save forms! bye Andre

The quick answer is no. If all you want to do is stop the rename, it is probably easier to just put in the restriction via code rather than buiding new forms, etc. You can use code in 2 spots to stop the rename. If you want it at the table level, you can just put an error in the OnRename Trigger on the table (Like Sales Header). If you only want it at the form level, then you can put some code in the OnModify Trigger. Something Like: IF “No.” <> xrec.“No.” THEN ERROR(‘You can not rename an Item.’); C.

I have to agree with Chris’s method. I just did this recently, where I put an ERROR function in the OnRename trigger of the table in question. Maintianing multiple forms is a pain, unless that is the only way around it.