The views and opinions expressed in this blog are those solely of the author(s) and do not necessarily reflect Microsoft’s current policy, position, or branding. For official announcements and guidance on Dynamics 365 apps and services, please visit the Microsoft Dynamics 365 Blog.
Choose your path Increase your proficiency with the Dynamics 365 applications that you already use and learn more about the apps that interest you. Up your game with a learning path tailored to today's Dynamics 365 masterminds and designed to prepare you for industry-recognized Microsoft certifications.
Visit Microsoft Learn
2019 release wave 2 Discover the latest updates and new features to Dynamics 365 planned through March 2020
Release overview guides and videos Release Plan | Preview 2020 Release Wave 1 Timeline
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming TechTalks
There is always requirement from many customers to Append information to the Navision Reports.
Recently one of my reader have requested me for any such functionality which can help him Append information from Word or Excel Files to Navision Reports.
While searching for solution for such requirement i came across this scope if we can do the same from outside Navision integrating the functionality with Navision.
Although i am not sure how much this post will answere to the requirement raised by my this reader but still this can be an work around to this requirement.
In my previous 2 posts i have answered this approach, Let us assemble all of them to provide solution to this requirement.
Please see my privious posts, i will not repeat already covered part in this post. Here is the link to those posts:
Converting Office Files into PDF from Navision
Merging PDF Files in Navision
In this post i will be using these functions discussed in above posts.
The Same Setup will be applicable to this post too.
Since we are appending our other information to the Navision Report so we will be at First Step saving our Customer Sales Invoice to PDF.
Later some information which need to be appended to this report is in Word File the path of which is stored on Customer Card.
How to work with Converting Office file to PDF is already discussed in previous post Link shared above.
So Now we have Our Report in PDF and Additional information to be appended to Report is also in PDF. Now it will be easy for us to Merge both the File to have single PDF File.
How to Merge these files is also already discussed in my previous post. Link shared above.
Let us see how we can assemble above both functionality to get our required result.
Approach is very simple, i have created a button on Sales Invoice to Print the Report which performs above discussed process.
On Sales Invoice Page I have added one Button which calls my Function to Print & Merge the document, it takes Invoice No & Sell-to Customer No. as a parameter.
I have created a function to Save the output of Report to PDF, using standard functionality available in Navision.
The PrintSalesInvoice function called from Sales Invoice Page with Invoice No & Sell-to Customer No.
This Function calls the SaveReportAsPDF explained above.
Converts the Office file that is attached on Custommer Card, discussed in previous post Link provided above.
Calls the MergePDFFiles, discussed in previous post Link provided above.
So Now at single click of Button entire task is done for us.
To keep it simple no additional checks and other routine tasks have been included like after task is completed clean up of all temporary files and moving the Result file to desired Location etc.
Now you know the logic so you can tweak the code accordingly to get the functionality working as per your requirement.
Thats all for this post. I will come up with more information in my up coming posts.
You keep you requirements posting to me, i will try my best to answer your queries in form of my future posts, at earliest possible from my end.
Till then kee exploring & Learning.
Business Applications communities