Customer statement in NAV 2016 CU04.

Eklund
Member Posts: 2
In connection with NAV 2016 I want to e-mail customer statement - I can choose to view account statements, PDF, e-mail, Excel and XML in the "Output Options". I choose e-mail but nothing happens, what am I doing wrong for nothing happens.
I want to send customer statement to one customer per. e-mail.
I want to send customer statement to one customer per. e-mail.
0
Answers
-
The following link shows how to setup SMTP e-mail...
https://msdn.microsoft.com/en-us/library/dn951539(v=nav.90).aspx0 -
This is a bug in NAV 2016 and it still exists with NAV 2016 CU11. There will be two variables in CAL Globals in that report. SupportedOutputMethod and ChosenOutputMethod. You need to use SupportedOutputMethod in the request page and rename the caption as Report Output. You can find the similar working code in Report 116 - Statement.
Note this report works fine from object designer, it will have problem only running from report selections.
Write the below code on
Report Output - OnValidate()
ShowPrintRemaining := (SupportedOutputMethod = SupportedOutputMethod::Email);
CASE SupportedOutputMethod OF
SupportedOutputMethod::Print:
ChosenOutputMethod := CustomLayoutReporting.GetPrintOption;
SupportedOutputMethod::Preview:
ChosenOutputMethod := CustomLayoutReporting.GetPreviewOption;
SupportedOutputMethod::PDF:
ChosenOutputMethod := CustomLayoutReporting.GetPDFOption;
SupportedOutputMethod::Email:
ChosenOutputMethod := CustomLayoutReporting.GetEmailOption;
SupportedOutputMethod::Excel:
ChosenOutputMethod := CustomLayoutReporting.GetExcelOption;
SupportedOutputMethod::XML:
ChosenOutputMethod := CustomLayoutReporting.GetXMLOption;
END;Kathiravan M
ArcherPoint1 -
Could you please explain
You describe that semilar working code can be found in repport 116 -statement. But I believe that the report that doesn't work is 116??!!
My 116 looks like the code you have above my version is 9.00.439870 -
Mailing the Customer Statement requires the setup of a "Document Layout" with an email address on the Customer in question (at least for NAV 2016) - "Document Layout"s are found in the Customer Group on the Navigate Tab on the Customer Page.
I don't know why this was made in that way, but when processing the Statements for mailing, NAV runs through the function CU8800.RunReport which (for some unknown reason) in turn runs CU8800.RunReportWithCustomReportSelection with a blanked CustomReportSelection-record parameter. Now in CU8800.RunReportWithCustomReportSelection the statement EmailAddresses := CustomReportSelection."Send To Email"; is called (and for good reason, as you can set different e-mails for different document types), but if no "Document Layout" is setup for the Statement on the Customer, no Custom Report Selection will exist with an email address, and naturally the variable EmailAddresses will be blank. And a Statement for a blank email address obviously won't be mailed. (but it will be printed though if you selected Print Remaining on the request page).
So try setting up the Document Layout for Customer Statement with an email address on the Customer in question - that worked for me.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