I'm trying to write a code witch will open any form (for example, any report form) and add some controls to the end off the form with will serve for the common logic of these forms. So I tried to add them with the following code:
Code |
---|
BottomGroup = Items.Add ("BottomPanel", Type("FormGroup")); BottomGroup.Type = FormGroupType.ButtonGroup; Button = Items.Add("OKButton", Type("FormButton"), BottomGroup); Button.Type = FormButtonType.UsualButton; Button.CommandName = "CommonCommand.SaveReport"; |
The problem is that "CommonCommand.SaveReport" is unrecognized by the system no matter that the handler exist. Also these controls does not appear in the form. Do I need to do some more actions to display them?
The code is executed in the OnCreateAtServer event