Hi every one, Today I have very small tip. During customization we need to add filters at run time. Specially in the case of inquiry forms. But Now we have to work with extension. Extensions are much more powerful then over layering.
So first one thing to copy Datasource OnQueryEXecuting event. And paste in Extension class.
The sample code snippet is here.
[FormDataSourceEventHandler(formDataSourceStr(HcmDiscussion, HcmTopicRef), FormDataSourceEventType::QueryExecuting)]
public static void HcmTopicRef_OnQueryExecuting(FormDataSource sender, FormDataSourceEventArgs e)
{
FormRun HcmDiscussionForm = sender.formRun();
sender.query().dataSourceName(sender.name()).addRange(fieldnum(HcmTopicRef, HeadingRefRecId)).value(queryValue(_heading.RecId));
}