Wednesday 7 February 2024

How To: Customize BankPaymentAdviceVendV2 SSRS Report

In D365FO, there are two versions available for bank payment vendor invoices. However, in the latest version, Microsoft has made it mandatory for users to utilize the Bank Payment Advice V2 report, as shown in the image below.

In this blog, we will discuss how to customize the BankPaymentAdviceVendV2 report step by step.

Step: 1
Create an extension of BankPaymentAdviceVendV2Tmp Table.

Step: 2
Create an extension of the BankPaymentAdviceVendControllerV2 class and write a COC for the getReportName() method. Design your new custom report to replace the out-of-the-box report.

Step: 3
Create an extension of the BankPaymentAdviceVendDPTransferQueryGenerator class and write a COC for addInsertionFeilds() and addProjectionFields() methods to initialize and map your custom fields, if any.

addInsertionFields Method: In this method you need to initialize your custom fields

addProjectionFields Method: In this method you need to map the fields of BankPayAdviceVendTmp (V1) in the same sequenece as provided in addInsertionMethod. It is simply assignment of the value through version 1 table to version 2 table.

Note: If you have customize field in BankPaymentAdviceVendV2Tmp table then you also need to extend BankPaymentAdviceVendTmp, so that you can map it in addProjectionFields method. Otherwise you won't pass the values in fields.

Step: 4
Now subscribe the getDefaultReportFormatDelegate() method and under VendPaymAdvice enum add the highligted code. 

Step: 5
Duplicate the OOTB BankPaymAdviceVendV2 report.

Step: 6
Override insert() method event handler (onInserted) of BankPaymentAdviceVendTmp table, so you can assign value in version 1 table and map it in projection fields method as show in step-3 image.

Step: 7
Now just we need to select report format design from Print management setup (Account Payable -> Setup -> Forms).

That is all you need. Cheers!

No comments:

Post a Comment

How to Get Customer Free Text Invoice "Totals" form field value with X++ in D365FO

Customer free text invoices are an essential aspect of financial management in D365FO. In this blog, I have compiled all the code needed to ...