Skip to main content

#bcopendiscussion - Dummy Extension for Print Custom Report From Purchase Order.

 Hi Readers,

This article is originated from one of our weekly #bcopendiscussion. This article talks about a concept you can enhance this extension the way you wanted. 

I have two other way that I can handle it, so feel free to add your views in the GitHub repo. 

If you find this useful please thanks  Shahid Ullah.

#bcopendiscussion

The discussion question was - 

I like to replace the existing Purchase Order Report with my Developed Purchase Order Report using the below condition-

I have added a filed Order Type and Value is say 1,2,3

If Order Type 1 then like to call Custom PO report ID-50001

If Order Type 2 then like to call Custom PO report ID-50002

If Order Type 3 then like to call Custom PO report ID-50003

Here is how I thought would be simple extension for it -

1. Add a Field in Purchase Header Table and Purchase order Page.

Using Table Extension add a field & using page extension add field in General Tab.

** Just for Demo I am using SDH Prefix/Suffix.


2. Add a Codeunit To Subscribe Event from Table Report Selection.

Check it is purchase order or not. If its not purchase order then exit otherwise call customize report.

3. Add Reports that you need. 

For Demo I just copied base Microsoft Report and saved in 5000 Numbers.

4. Test Process, Check Purchase order and check with Order Type = ''.

5. Test Process, Check Purchase order and check with Order Type = option2.

If you find this useful, or would like to enhance this please feel free to download / contribute using GitHub repo.

GitHub Link - https://github.com/postsaurav/PurchaseOrderPrinting

If you are still in C/AL please download objects from here. OneDrive Link

Source code is developed using Business Central 14. You can branch out and download symbol to test it. When you will try to download symbol system will generate launch.json.

Let me know your views on same.

Regards,
Saurav Dhyani
https://www.sauravdhyani.com/

Comments

Post a Comment

Popular posts from this blog

BC 21 and Higher - PowerShell Cmdlet (Replacement of Business Central Administration).

Hi Readers, As discussed in last article about deprecating of Business Central Administration, there are few common actions that we use in administration till Business Central 20. For our on-prem customers, we will still require doing activities. As Microsoft suggest we need to start using PowerShell cmdlet.    Let's see how to do those via PowerShell, or Administration Shell. I will be keep adding commands as you comment to this article.

Send Mail with Attachment From Navision.

Hi all, We have seen how to save a report into PDF and how to send mail to a customer. Let's link these two post in one i.e. Mailing statement to a customer into PDF Format. This article is part of the Series. Please Refer  Table of Content here . If you have the old objects set let me brief you what I will be changing - 

MSDYN365BC - Data Upgrade To Microsoft Dynamics 365 Business Central on premises.

Hi Readers, We have already talked about the number of steps for upgrading to Business Central on Premises from different NAV versions. After that article, I received multiple requests for an article which list down steps for Data Migration. In this article, we will discuss steps of data migration to MSDYN365BC (on-Prem) from NAV 2017. For this article, I am considering a Cronus Demo Database without any customization. For an actual upgrade project, we will have to complete object merge using compare and Merge process. After the Merge Process, the next step is data migration. Let's discuss those steps. Direct Upgrade to Microsoft Dynamics 365 Business Central (on-Prem) is from following versions - 1. NAV 2015. 2. NAV 2016. 3. NAV 2017. 4. NAV 2018.