Hi there,
I have a form, let's say, HBDayForm. The purpose of this is to greet the user with a messaje if it's his birthday.
The form is ok, it' s functional and tested. The problem is that the only viable solution I found is to modify the startupPost method from the info class, in order to 'trigger the form'.
I went to the EmplTable and I modified my BDay to match the current date , however, the form is not initialized when AX starts.
Any Idea why the form is not triggered or if there is any other method than startupPost to be modified?
Many thanks!
Version: AX 2009
Code:
void startupPost()
{
EmplTable emplTable;
int dayOfBirth = dayOfMth(emplTable.BirthDate);
int monthOfBirth = mthOfYr(emplTable.BirthDate);
int dayOfMonth = dayOfMth(systemdateget());
int monthOfYear = mthOfYr(systemdateget());
str emplName = emplTable.name();
Args args = new Args(); //formrun
FormRun formrun;
;
if (dayOfBirth == dayOfMonth && monthOfBirth == monthOfyear )
{
args.name(formStr(HBDayForm));
formRun = classFactory.formRunClass(args);
formRun.init();
formrun.run();
}
}
*This post is locked for comments
I have the same question (0)