2
votes

While I was working on the enabling and disabling the form controls I noticed that there are two kinds of form elements. One is the object of the form control class which is accessible as below:

FormControl _control = _formRun.design().controlNum(i)

The other type of the form's elements having "build" word which is accessible as follow:

FormBuildControl _controlBuild = _formRun.form().design().controlNum(i)

Could you please explain what are the differences and when should we use formControl class and when should we use FormBuildControl?

ps: I discover that I cannot enable or editable a field or button using FormBuildControl.

1
Take a look at Form Classes. - FH-Inway

1 Answers

3
votes

Classes with the word Build in them contain logic used during the design-time of the control (such as adding properties for the control when adding it to a form in visual studio). In Microsoft documentation it is referred to as the x++ build class.

Classes without the word build contain logic used during the run-time of the control. In Microsoft documentation it is referred to as the x++ run-time class.

Compare the two classes QuickFilterControl and QuickFilterControlBuild for a more advanced look at an out of the box control's implementations of each paradigm.

Microsoft documentation that will explain further can be found here