Filter Data on FORM event Handler in D365 FO
FormDS EVent Type: QueryExecuting
Create new Class and Paste Event Handler code
[FormDataSourceEventHandler(formDataSourceStr(<FormName>, <FormDSName>), FormDataSourceEventType::QueryExecuting)]
public static void <FormDSname_Default>_OnQueryExecuting(FormDataSource sender, FormDataSourceEventArgs e)
{
sender.query().dataSourceName(sender.name()).addRange(fieldnum(<Table>,<FieldName>)).value(queryValue(<Value>));
}
FormDS EVent Type: QueryExecuting
Create new Class and Paste Event Handler code
[FormDataSourceEventHandler(formDataSourceStr(<FormName>, <FormDSName>), FormDataSourceEventType::QueryExecuting)]
public static void <FormDSname_Default>_OnQueryExecuting(FormDataSource sender, FormDataSourceEventArgs e)
{
sender.query().dataSourceName(sender.name()).addRange(fieldnum(<Table>,<FieldName>)).value(queryValue(<Value>));
}
No comments:
Post a Comment