General X++ Development
How do I extend a form datasource method using Chain of Command?
How do I extend a form datasource method using Chain of Command?
1 answer
Write an answerCreate an extension for the specific form datasource and wrap the datasource method.
[ExtensionOf(formDataSourceStr(SalesTable, SalesTable))]
final class SalesTable_SalesTable_Extension
{
public void executeQuery()
{
// Add or update ranges here if they must exist before the query runs.
next executeQuery();
}
}Where your custom logic goes depends on whether it must run before or after standard behavior. The wrapper method still needs to call next.
Know the solution?
Sign in to contribute an answer and build your community reputation.
Sign in to answer