Chain of Command on FORMS
1. Method on DataSource extension
[ExtensionOf(FormDatasourceStr(<FormName>,<DataSourceName>))]
2. Method on DataSource field extension
[ExtensionOf(FormDataFieldStr(<FormName>,<DataSourceName>,<DataSourceFieldName>))]
3. Method on Form Control extension
[ExtensionOf(FormControlStr(<FormName>,<controlName>))]
4. Method on Form extension
[ExtensionOf(FormMethodStr(<FormName>,<cMethodName>))]
Samples:
FORM on Extension
Samples:
FORM on Extension
DataSource Method
FormDataSource fds = this;
<Table buffer> = fds.cursor();
DataSourceField
FormDataSource fds;
FormDataObject fdo = any2Object(this) as FormDataObject;
fds = fdo.Datasource();
<Table buffer> = fds.cursor();
FormControl
FormDataSource fds;
FormButtonControl fbc = this as FormButtonControl;
fds = fbc.formRun().Datasource(tableStr(<Table Name of DS>));
<Table buffer> = fds.cursor();
Sample:
FormDateTimeControl dtc1 = any2object(this) as formDateTimeControl;
FormRun fr = dtc1.formRun() as FormRun;
FormDateTimeControl dtc2 = fr.design().controlName(formControlStr(<formname>, <controlname>) as formDateTimeControl;