AXForum  
Вернуться   AXForum > Microsoft Dynamics NAV > NAV: Blogs
NAV
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 16.08.2017, 17:11   #1  
Blog bot is offline
Blog bot
Участник
 
24,920 / 825 (77) +++++++
Регистрация: 28.10.2006
saurav-nav: Microsoft Dynamics NAV 2017 - Email From NAV Part 1.
Источник: http://saurav-nav.blogspot.com/2017/...mail-from.html
==============

Hi Readers,

Today I would like to discuss a simple feature that Microsoft is working to be a part of standard NAV or I would say developed a Pattern for, but most of us are still using the old customizing ways which are hard as well as confusing to other developers.

The Pattern in Developed and Enhanced from Microsoft starting NAV 2015. In today's article we will discuss how to use the pattern if we want to send an email from NAV and the in the future article we will discuss other enhancements which can be used instead of customizing NAV.

The idea is Simple - Using base approach and Customize Less, Saves Cost to Customer and hassle for other developers.
Your comments are awaited for future articles.

** This pattern is available from NAV 2015 onwards but for demo, we will be using in NAV 2017.

A new Table and Codeunit have been introduced in NAV for email pattern.
Table - 9500 - Email Item.
Codeunit - 9520 - Mail Managment.

It take care of most of the things, some of them are listed below -
  • Raise a Dialog before sending an email. [Optional]
  • Send Email via Job Queue. [No Errors are shown]
  • Attach Document.
  • Add CC & BCC Email ids.
  • Append a Body in Email Using a Blob.
  • Check Valid Email Address.
  • Add Media.
  • Plain Text Formatted.
  • Get Sender Address From - Current User ID, Office 365, SMTP Setup, User Setup, Authentication Email & Active Directory.
I think it might interest you, I am sure these are all the cases that we want to be supported as a customization.

The only feature that I would request to add in this pattern is a possibility to add multiple attachments in an E-mail Item.

Any email that you want to send with max. 1 attachment can be send using this pattern.

So let's see how to use this pattern in code.

Case - My Customer requested to customize NAV for the possibility of sending Report Open Customer Entries using an action on customer page.

Let's Create a Codeunit to send email using the Pattern discussed above -

1. Create a Function which accepts Customer record as a parameter.

This function check that Email Exist on Customer or not and then generates the record in Email Item.


2. Create Two supported functions which be called from above function.
These functions create Email Body and Email Attachment.


3. Let's Now add action in Customer List / Card which calls this custom codeunit function.
Now Let's Demo the code -
If all setup is correct then the system will generate an email as shown below.


Hope it helps.

Let me know if it makes sense there are so many additional features in this pattern that I would like to explain if this article helps my readers.

Waiting for your reply.

You can download the codeunit from OneDrive.

File Name- Microsoft Dynamics NAV 2017 - #SauravNAV_Email_Pattern_V1.0

Let me know your views.
Regards,
Saurav Dhyani
saurav-nav.blogspot.in


Источник: http://saurav-nav.blogspot.com/2017/...mail-from.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
Старый 16.08.2017, 20:54   #2  
Sancho is offline
Sancho
Administrator
Аватар для Sancho
Лучший по профессии 2017
Лучший по профессии 2009
 
1,293 / 220 (10) ++++++
Регистрация: 11.01.2006
о!
я ждал этого!
надо попробовать!
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
waldo: Microsoft Dynamics NAV 2017 – what’s really new? Blog bot NAV: Blogs 0 13.10.2016 05:22
NAV Team: Upgrading from Microsoft Dynamics NAV 2009 R2 or Microsoft Dynamics NAV 2009 SP1 to Microsoft Dynamics NAV 2015 Blog bot Dynamics CRM: Blogs 0 23.02.2015 13:00
NAV Team: How to: Set up your Microsoft Dynamics NAV installation for Single Sign-on with Office 365 using Windows PowerShell Blog bot Dynamics CRM: Blogs 0 19.12.2013 15:10
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 13 Blog bot Dynamics CRM: Blogs 0 27.03.2013 22:12
dynamics-community-at: NAV 2009–Mail from mbsinsight Blog bot Dynamics CRM: Blogs 0 04.04.2011 10:55
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 03:03.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.