CREATE EXTENSION OF TABLE WITH CHAIN OF COMMAND
Below example will help to understand how to create a table extension and within that table extension create a chain of command method .You can also write a new method if required .eg method testmethod.
[Extensionof(tableStr(SalesTable))]
final class SalesTable_Extension
//the class must be extended by _extension and it should be decorated by extensionof(tablestr(tablename))
{
/// <summary>
///
/// </summary>
public void modifiedField(FieldId _fieldId)
{
next modifiedField(_fieldId); //the next operator needs to be placed as per the requirement
if (_fieldId == fieldNum(SalesTable,ConfirmedDate))
{
this.ConfirmedDate= datenull();
}
}
public void testmethod()
{
/// to some task here.
}
}
No comments:
Post a Comment