Automate sending email of report genreated?

How can i automaticlly sent email of’ " Aged account receivable report" to the sales representative in microsoft Dynamics Nav 2009?

Cheers

Renjith

Check this Blog

http://blogs.msdn.com/b/nav/archive/2009/10/08/send-email-with-pdf-attachment-in-nav-2009.aspx

Hi,

Actually that is manual step right? I want to automate it.

Eg:

We have lots of sales representative, I want to automate the report generation and automatically sent the aged account receivable report to the corresponding sales representative without any manual operation.

Try to create the above logic in a report and run it through NAS.

Do you have any idea? I am not using role tailored client. Iam using Microsoft Dynamics NAV 2009 Classic.

Use SAVEASHTML or SAVEASXML to save the report in specific path and use Codeunit 400 to create message and attach the crated file and send…

To automate email sending.

create a codeunit like this.

OBJECT Codeunit 50021 Nav_Timer
{
OBJECT-PROPERTIES
{
Date=05/18/11;
Time=[ 6:23:49 PM];
Modified=Yes;
Version List=;
}
PROPERTIES
{
SingleInstance=Yes;
OnRun=BEGIN
IF ISCLEAR(NavTim) THEN
CREATE(NavTim);

NavTim.Interval:=10000;
NavTim.Enabled:=TRUE;
END;

}
CODE
{
VAR
NavTim@1000000000 : Automation “{3B311C81-140E-11D5-8B18-00D0590B4EC5} 1.0:{3B311C92-140E-11D5-8B18-00D0590B4EC5}:‘Navision Timer 1.0’.Timer” WITHEVENTS;
emails@1000000001 : Codeunit 397;

EVENT NavTim@1000000000::Timer@1(Milliseconds@1000000000 : Integer);
BEGIN

emails.NewMessage(‘mailid’,’’,‘Hi’,‘Received’,‘Filepath’,FALSE);
END;

EVENT NavTim@1000000000::TimerError@2(ErrorString@1000000000 : Text[1024]);
BEGIN
//MESSAGE(‘hi’);
END;

BEGIN
END.
}
}

Then call this codeunit from companyopen of codeunit 1. I have mentioned the time to be 10000. You can change the time also.