COC to create custom method for forms
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.
Form Custom
method:
[ExtensionOf(formstr(CustTable))]
final class
CustTableForm_Extension
{
public amount getAmount(amount _amount)
{
//Here
we can get buffers,Add logics and change parameter as per our business
requirement.
Amount retAmount =next getAmount(_amount);
//Here
we can get buffers,Add logics and change return values as per our business
requirement.
Return retAmount;
}
}
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));
Comments
Post a Comment