AX 2012. Report 'Missing timesheets'. Which class/job is used to send mails?

We use report ‘Project management and accounting->Reports->Hours->Missing timesheets’.

This report has filter ‘Send e-mail’:

This report doesn’t send any mail.

Which other functionality/jobs are used to send mails ?

We want to understand the process. How the emails are sent.

As far as I have been able to tell, there is not actually any code which sends an email.

(Using AX 2012 CU3. It doesn’t appear to be in list of hotfixes for CU4. Not sure about AX 2012 R2)

I have modified AOT\Classes\ProjMissingHourRegDP\insertTmpProjMissingHourReg to include, as shown below.

Note that you will probably have to change “” to the email address for your AOS service account so emails don’t get rejected by your mail server. It also makes running the missing timesheet report take longer - I estimate 0.5 seconds per email sent, on our system. It also uses quick and dirty sysmailer, so it doesn’t use the email distributor and you can’t see a record of it under the System Administration menus.



/// Gets the required data and inserts it into the temporary table.



/// Table buffer for the ProjWorkerSetup table


public void insertTmpProjMissingHourReg(ProjWorkerSetup _projWorkerSetup)


HcmWorker hcmWorker;

// delcare the sysmailer

SysMailer mail;

//end insert

// Variable for the permission class.

InteropPermission perm;


perm = new InteropPermission(InteropKind::ComInterop);


mail = new SysMailer();


hcmWorker = HcmWorker::find(_projWorkerSetup.Worker);


tmpProjMissingHourReg.PersonnelNumber = hcmWorker.PersonnelNumber;

tmpProjMissingHourReg.Worker = hcmWorker.RecId;

tmpProjMissingHourReg.Name =;

tmpProjMissingHourReg.Phone =;

tmpProjMissingHourReg.Hour = (select sum(Qty) from projEmplTrans where projEmplTrans.Worker == _projWorkerSetup.Worker &&

projEmplTrans.WorkerLegalEntity == _projWorkerSetup.WorkerLegalEntity &&

projEmplTrans.TransDate >= periodFrom &&

projEmplTrans.TransDate <= ProjPeriodLine::find(periodId,periodFrom).PeriodTo).Qty;

tmpProjMissingHourReg.PeriodId = _projWorkerSetup.PeriodId;

tmpProjMissingHourReg.PeriodFrom = periodFrom;

tmpProjMissingHourReg.PeriodTo = periodTo;

// insert sysmailer quicksend here to actually send an email!

if (sendMail && ( != “”) == true) {

mail.quickSend(“”,, strFmt(“Missing timesheet for %1”, tmpProjMissingHourReg.Name),

//strFmt(“Worker Email: %1 \r”,

strFmt(“Please complete your timesheet for the period %1 to %2 - thank you!”, tmpProjMissingHourReg.periodFrom, tmpProjMissingHourReg.periodTo)



// end of insert

tmpProjMissingHourReg.EmailSended = ( && tmpProjMissingHourReg.Hour == 0 && sendMail) ? true : false;