Automatically Date should be seen in the From Date & To date Ax 4.0

Hi All

I have a requirement like , IN Ax 4.0once i open the Report STM Report i can see once dialog box, in this dialog box From Date & To Date option is there.

But here my requirement is without enterung the manually the from date and To Date should be filled. the difference between the from date and to date is 1 financial year.

if the user want to change the date he can also change as per his convinence.

So any one help me in wich method i need to add the code . below is the screen shot.8877.cch.jpg

Hi paavan,

U can use “DateValue” property of that From Date and To Date control.

Hope it helps:



HI Ramya

Thanks for the reply, But when i am trying to open this particular form , i can see the dialog form there i cant able to see the from field and the to field date … may i know why it is comming like this.

Ok.Since it is dialog it shows like this eg. Fld10_1.

you can check the class , caller of this dialog .

Hi Pavan,

Check whether the form is calling any class… the dialog would been executed from there.

public Object dialog(Object _dialog)
DialogRunbase dialog = _dialog;
container fiscalcon;

fiscalcon = ledgerperiod::findFiscalYearDates(today()); // To get the Fiscal year dates (this is an example) you can implement your own logic…

dialog.addGroup(“From Date”);
fieldfromdate = dialog.addField(typeid(transdate),“Fromdate”);

dialog.addGroup(“To Date”);
fieldtodate = dialog.addField(typeid(transdate),“Todate”);

return dialog;

HI Yeswanth

in the form Inint method this code i have written then i got the from date & to date automatically after super().

Fromdate = LedgerPeriod::openingPeriodStart(systemdateget());
Todate = LedgerPeriod::findClosingDate(systemdateget());