Advertisements

Mail Sending Option in NAV 2017 with Cover Letter & Attachments –Part 2

Continuing from previous post, further in next step we will apply same feature discussed in earlier post to our custom documents and learn where all places we need to take care development to get it working.

If you have missed First Part you can find here. Mail Sending Option in NAV 2017 with Cover Letter & Attachments –Part 1

In my Example I am using Policy Module:

I am using my Custom Table Policy where Policy Holder is setup as Customer, also few general details related to policy is stored. In nutshell we are concentration on Sending mail to customer as we have done in previous post for sending Invoice details to customer.

Step-1:

In my Policy Table I have added 2 Function as below:

MSI-07

 

MSI-08

SendRecords()

IF DocumentSendingProfile.LookupProfile(“Policy Holder No.”,FALSE) THEN

SendProfile(DocumentSendingProfile);

 

SendProfile(VAR DocumentSendingProfile : Record “Document Sending Profile”)

DocumentSendingProfile.Send(

DummyReportSelections.Usage::”Policy Issue”,Rec,”Document No.”,”Policy Holder No.”,

DocTxt,FIELDNO(“Policy Holder No.”),FIELDNO(“Document No.”));

Step-2:

In Table 77 Report Selections add new option to usage field

MSI-09

Step-3:

In Table 60 Document Sending Profile add below customization.

Add Text Constants

MSI-10

Update below function as:

MSI-11

Step-4:

In Table 9657 Custom Report Selection add below customizations.

MSI-12

 

MSI-13

Step-5:

In Page 9657 Custom Report Selection add below customization.

MSI-14

 

MSI-15

 

MSI-16

Step-6:

Create 2 Reports one for Mail Body and one for Attachment. You can use same report as attachment too, it depends on your requirement.

Step-7:

In Page Policy add below customization.

MSI-17

 

MSI-18

Step-8:

Setup your report Selection as below:

MSI-19

Now you are good to go.

Test your solution/ customization.

This is just a small idea, many lots can be done depending upon your requirements.

 

 

 

Advertisements

Important

Most of the contents you find in this blog will be either inherited from MSDN or Navision Developer IT Pro Help. Some places images are also directly taken from these sites. Purpose is simple to try those stuffs and re-produce adding few things as per my understanding to make easy understanding for others and quick reference.

Here nothing under my own brand or authorship of the content. At any point of time we are just promoting Microsoft stuffs nothing personnel with same.

Hope stuffs used here will not violate any copyright agreement with them. In case by mistake or in-intestinally it happens and the Microsoft feels these should not be used Microsoft have full right to inform me about same and will be glad to take down any such content which may be violating the norms.

Purpose is to promote Navision and share with community.

FB Profile

Like FB Page

%d bloggers like this: