Modify Check in D365FO
Farman Ameer
Microsoft Dynamics AX | D365 F&O Technical Consultant | Dot Net | Angular | DevOps
In this blog, I will demonstrate you how to modify existing Check for Bank Accounts in Dynamics 365 Finance and Operations.
The upper part of Check is called 'Check Stub' . This portion contains invoice lines. This part of check contains the details about the amount paid. This entire portion exist in one field called ‘slipText’. Lower part of Check contains the Total amount, Name, company logo and Signature.
‘CheckDP’ class is responsible for data on Check Report. Check displays data in report from?ChequeTmp table. 'Check stub' has invoice lines with header details. Entire stuff in 'Check stub' exist in single string field called 'slipText’?of table 'ChequeTmp'.
Here is the hierarchy to for 'slipText' field.
ChequeDP > populateChequeTmp()?
Value in ‘tmpChequePrintout.slipTxt’ fills from CustVendCheque(Class) output() method
If you further go into the fllSlipText method you will see 'determineSlipTextTitleAndEndLinesAdjustmentForColumnHeaders' method. This method concatenate strings and prepare header text of check stub. I will extend this method later in this blog.
In same class 'CustVendChequeSlipTextCalculator?', method ‘determineSlipTextAndEndLinesAdjustmentForBankChequePaymTrans’ is responsible for Lines or details in check stub. I will extend this method later in this blog.
Lets start changings in check
1-??Create Duplicate Report
2-?Create Extension of class ‘ChequeController′.?Extend ‘determineReportMenuOutput’ method and add name of your report and design.
领英推荐
3-??After step 2, when you run your check, it will open your report. In my case requirement is to modify check stub and add new field in check. To make changes on check stub follow the following steps:
i.????As discussed above the Output method on VendCheque is responsible for check and check stub. Create extension of class ‘CustVendChequeSlipTextCalculator’.
The hierarchy of classes is VendCheque > CustVendChequeSlipTextCalculator (method).?To modify header or columns of invoice lines you have to extend the method ‘determineSlipTextTitleAndEndLinesAdjustmentForColumnHeaders’.?
ii. ?To modify invoice lines in check stub extend the method ‘determineSlipTextAndEndLinesAdjustmentForBankChequePaymTrans’
Changes for Check stub has been completed. Now make changes to Check.
5-??To add new field on check. Create extension of table ‘TmpChequePrintout’ and add new field.
6-?Create extension of class ‘CustVendCheque’ and extend method ‘output’. Set value in new field and update temp table.
7-?ChequeTmp is main datasource on Check.?In ‘ChequeDP’ class values in ChequeTmp table fills from ‘TmpChequePrintout’ table.?Create extension of table ‘ChequeTmp′and add new field (Same as added in step 5)
8-?Create extension of class ‘ChequeDP’ and extend method ‘populateChequeTmp’. Set value in newly added field of temp table ‘ChequeTmp’.
Modifications on Check has been completed. Build and Deploy Report.?
This is very informative. Good job Farman Ameer