if ( EDates.dateValue() == dateNull() ) {
error( "Date value is empty." );
EDates.setFocus();
}
Microsoft AX 2012, X++, C#, SQL server, SSRS, Java, JavaFX, Oracle, PL/SQL, Delphi - codes examples, step-by-step tutorials, experiences.
Tuesday, November 21, 2017
AX - How check if DateEdit control is empty
AX - empty code
For empty code use method exceptionTextFallThrough():
if ( RDates.selection() == ProdRouteCardForm_Dates::BySchedule ) {
exceptionTextFallThrough();
}
AX - How to get first and last day in month
Use this code:

int iMonth = 6; int iYear = 2017; date firstDate = mkDate( 1, iMonth, iYear ); date lastDate = endMth( firstDate ); info( date2str( firstDate, 321, DateDay::Digits2, DateSeparator::Hyphen, DateMonth::Digits2, DateSeparator::Hyphen, DateYear::Digits4 ) ); info( date2str( lastDate, 321, DateDay::Digits2, DateSeparator::Hyphen, DateMonth::Digits2, DateSeparator::Hyphen, DateYear::Digits4 ) );

Subscribe to:
Posts (Atom)