Generally we get demand for customized mail body to send from Navision. Normally we use templates or html etc. coding to achieve this. In NAV 2017 this feature is now available in product itself. Today we will explore this feature available for Std. documents and learn to setup, further in next step we will apply same to our custom documents and learn where all places we need to take care development to get it working.
The cover letters are created using RDLC or Word layout customization features providing visual consistency with any attached pdf document.
Document Layout for a Customer
For Example say we want to setup different e-Mail body for specific customer. To achieve this we will assign a specific report by customer which will enable us to process multiple formats at the same time. We will use the Customer Layout from the customer card by Document Type to do this.
In above example I am setting up a customized cover letter designed using selected report.
The Send To Email The e-Mail will be sent to the e-Mail provided in the customer card or you can provide an extra e-Mail in this field or you can specify at the time of sending mail if not setup automatic.
Email Body Layout Description = Modern – Email Body (Choose from the Custom Report Layouts)
Use for E-mail Body select this if you wish to include output of selected report as Cover Letter to Email body.
Send and Receive E-Mail
We can now use the Send Email window to have a preview of what our layout will look like and the using the options we can send the e-Mail.
Let’s open a posted invoice for this customer.
On the Posted Sales Invoice click Send, which will open a window with some options, such as:
We can choose Email Prompt for Settings or use Default Settings
We can select how the attachment needs to be attached
We can also have Disk options as PDF or Electronic Documents if we use those.
Click OK. Before e-Mail is sent, we have the possibility to verify the e-Mail address, the subject line, the attachments and as per the Email Body Template, this is how the e-Mail will look like:
When we click OK, an e-Mail is sent to the Customer using the e-Mail Template.
By opening the e-Mail the recipient can see the contents of the invoice which has been sent using the template and the full invoice is also available as an attachment.
You can switch to a manual written message:
By using the Message Content field or
If you are using a client, you can open and edit the message in Outlook
In our next part of this post, we will see how we can enable this feature for our custom Pages & Documents.