how to filter the grid between two date ranges

 [Form]

public class SportsForm extends FormRun

{


    QueryBuildRange CurrencyQBR;


    [DataSource]

    class Sports

    {

        /// <summary>

        ///

        /// </summary>

        public void init()

        {

            super();


            CurrencyQBR= this.query().dataSourceName('Sports').addRange(fieldnum(Sports,StartDate));

        }


        /// <summary>

        ///

        /// </summary>

        public void executeQuery()

        {

            CurrencyQBR.value(SysQuery::range(StartDateControl.dateValue(),EndDateControl.dateValue()));

            super();

        }


    }


    [Control("Date")]

    class EndDateControl

    {

        /// <summary>

        ///

        /// </summary>

        /// <returns></returns>

        public boolean modified()

        {

            boolean ret;

    

            ret = super();


            Sports_ds.executeQuery();


            return ret;

        }


    }


}

Comments

Popular posts from this blog

How to Create a wizard in x++ d365

how to post trade agreement journals automatically using x++ code

X++ code to CREATE AND POST A TRADE AGREEMENT IN MICROSOFT DYNAMICS 365 in D365 F & O