Hi, Oliver.
If you don't want to show message box with error there is another solution.
You can hide button "copy".
Open form in Designer, open form's properties, click "open" in the row "command set" and uncheck "Copy". You must do it for all forms.
Unfortunately, in the list form key F9 still works.
We can prevent it with this code.
Code |
---|
&AtClient
Procedure ListBeforeAddRow(Item, Cancel, Clone, Parent, Folder, Parameter)
If Clone Then
Cancel = True;
EndIf;
EndProcedure |
Or this version in the object form
Code |
---|
&AtServer
Procedure OnCreateAtServer(Cancel, StandardProcessing)
If ValueIsFilled(Parameters.CopyingValue) Then
Cancel = True;
Return;
EndIf;
EndProcedure |