We can extend the logic of public and protected methods without having to use event handlers. COC, allows to use the method local and global variables. COC must be end with _Extension.
Form level method :
System search there are any extend methods , If Extend method is exist,run COC method first , next() method Invoke Standard form methods.
Override Method:
[ExtensionOf(formstr(CustTable))]
final class CustTableForm_Extension
{
public void init()
{
// here add the business logics
next init();
// here add the business logics
}
}
Get buffers :
FormRun formRun = this as FormRun;
FormDataSource CustTable_DS =formRun.datasource(ForomDatasourceStr(CustTable,CustTable));
CustTable custTable = CustTable_DS.Cursor();
FormControl custAccount = formRun.design().ControlName(FormControlStr(FormName,ControlName));
Example:
[ExtensionOf(formstr(CustTable))]
final class CustTableForm_Extension
{
public void init()
{
FormRun formRun = this as FormRun;
FormDataSource CustTable_DS =formRun.datasource(ForomDatasourceStr(CustTable,CustTable));
CustTable custTable = CustTable_DS.Cursor();
FormControl custAccount = formRun.design().ControlName(FormControlStr(FormName,ControlName));
next init();
custtable.CustGroup = “40”;
custAccount.visible(custtable.CustGroup);
}
}
Comments
Post a Comment