Using NAV v5.0. I have created a codeunit to call a report and save it as an HTML file. Then attaché the file and email it to specific address.
To automate the process I have sat up NAS and created a Job Queue record. The connection between NAS and the Job Queue record is successful, it runs the codeunint and an HTML file is created but for some reason it doesn't fire an email. if I run the codeunint manually everything will work fine and an email is generated.
The codeunint looks like this:
REPORT.SAVEASHTML(77016,'C:\Open Service Orders\OpenSalesOrders.htm',FALSE);
dhbAttachement := 'C:\Open Service Orders\OpenSalesOrders_Elie.htm';
Subject := 'Open Service Orders';
Body := 'Attached is a list of open service orders';
dhbEmail.NewMessage(ToName,'',Subject,Body,dhbAttachement,FALSE);
Note: I'm calling CodeUnit 397 to send the generate an email
the SingleInstance property on the codeunint is set to No.
I have checked the Job Queue Log table, the status is Success and no error messages.
Any Ideas??? Please help!!!
0
Comments
If not change the service account to your login id and try.
ArcherPoint, Inc http://www.archerpoint.com
Blog: http://www.navisionworld.com
skkulla
Thank you again for your reply toi my question..