Emailing from NAV

Andrew_Lees
Member Posts: 4
Hi,
When a NAV report layout is previewed, you can go to 'file' and select 'send' and then go to 'send report by email'. When this is pressed the report transposes itself into the body of the email.
Does anybody know how this is achieved?
Many Thanks
Andy.
When a NAV report layout is previewed, you can go to 'file' and select 'send' and then go to 'send report by email'. When this is pressed the report transposes itself into the body of the email.
Does anybody know how this is achieved?
Many Thanks
Andy.
0
Comments
-
This is archived directly by the NAV client .exe application. There is no C/AL code behind...0
-
Hi Andrew,
Kine is correct but if you want to mimic this your self you can create code for this.
To mimic it direct is quite easy just use report.saveashtml and call NewMessage in the mail codeunit 397.
The common solution is to save the report as pdf and then E-mail it
Search to forum and you will lots of post relating to this.
P.S. Welcome to Mibuso0 -
Hi there,
I would like to use this cool feature of sending reports via e-mail, but the e-mail address is always blank.
How does this work actually? How to fill the e-mail address, what is the trick of using this function?
Thanks for your help,Best Regards,
Gyula (Jules) Csiák-Sedivy
There are two things, which you cannot learn from books. True love and Software Coding.0 -
Set up Mail as a variable for codeunit 397 Mail.
After having saved the report as a pdf, get the correct customer, vendor or whatever record which contains the email address.
Create variables for email subject,email body,CCEmail, and AttachFileName, and populate them.
Then call the Mail codeunit:
Mail.NewMessage(Cust."E-mail",CCEmail,
Subject,Body,AttachFileName,TRUE);
Mail.Send;
The last parameter causes the email to be presented to the user to review before sending. If you want the email to be sent without review, the last parameter should be false.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions