how to filter the grid based on date

 [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)); // field name is Start Date

        }


        /// <summary>

        ///

        /// </summary>

        public void executeQuery()

        {

            CurrencyQBR.value(queryvalue(StartDateControl.dateValue())); // Datevalue method will bring the modified date to filter based on that value


// text method will bring the modified text to filter the grid data.


formgridcontrolname.text() will bring modified value to backend to filter the data.

            super();

        }


    }


    [Control("Date")]

    class StartDateControl

    {

        /// <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

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

x++ code to submit and approve and reject the invent movement workflow in d365 F&O