Data source filter using extension Dynamics 365 for finance and operations

[ExtensionOf(tableStr(smmOpportunityTable))]

 final class BI_SmmOpportunityTable_Extension
{


            /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        [FormDataSourceEventHandler(formDataSourceStr(BI_Safari_OpportunitySummary, smmOpportunityTable), FormDataSourceEventType::QueryExecuting)]
        public static void smmOpportunityTable_OnQueryExecuting(FormDataSource sender, FormDataSourceEventArgs e)
        {    
   

            FormRun BI_Safari_OpportunitySummaryForm = sender.formRun();

            sender.query().dataSourceName(sender.name()).addRange(fieldnum(smmOpportunityTable, BiWF_Status)).value(queryValue(BiWF_Status::Approved));
       
        }

}

Leave Comment

Your email address will not be published. Required fields are marked *