Customizing the Check Report via Extensions in Dynamics 365 for Operations

by | Updated December 18, 2017 | Development, Dynamics 365 for Finance and Operations

Recently I was asked to customize the Cheque_US report in Dynamics 365 for Operations. Based on this guidance from Microsoft I expected it to be a relatively easy and straightforward process. Here’s what I did to customize the check report via extensions:

  1. Duplicate the Cheque_US SSRS report to a model that extends the Application Suite model.

I called my new report MyCheque_US and added some text to indicate that it was the custom report—that way I could tell at a glance if I was looking at the stock report or my custom report.

  1. Create a new class MyChequeController that extends the ChequeController class in the same custom model.

Copy the main() method from ChequeController, and update it to use the report name for MyCheque_US:


  1. Extend the Cheque_US output menu item in the same custom model.

Set the Object property to refer to MyChequeController rather than ChequeController

The Object property is changed to MyChequeController rather than ChequeController.

I then compiled my solution and deployed the MyCheque_US report, and when I generated a payment everything worked! Well, almost everything: the custom report displayed as a blank page. I verified that if I switched back to the stock controller code controller.parmReportName(controller.getChequeReport()) then everything printed fine, but if I ran the same data through the MyCheque_US report it would fail every time.

After some digging I came to a startling conclusion. Based on its name and signature, I was trusting getChequeReport() to be a true accessor method:

getChequeReport() was trusted to be a true accessor method.

When I inspected the method itself, though, it quickly became apparent that it was something very different:



ChequeController.getChequeReport() violates two method writing best practices: a method should do only one thing, and method names should reveal intention.

The giveaway that getChequeReport() does more than one thing is the “and” in the documentation summary. If you need to use the word “and” when describing what a method does, the method does too many things!

Admittedly, the method name getChequeReport does communicate what the method returns. The problem is that it doesn’t communicate everything that the method does. Had it instead been named initAndGetChequeReport then the intent of the method would be clear (and would clearly indicate that the method does too many things.)

In hindsight it would have been better to split getChequeReport() up into two methods, one to initialize the report and the other to retrieve the report name. In the end I decided that the least risky way to solve my problem was to keep the stock call to parmReportName() in place, and follow it up with another call to parmReportName() to direct execution to my custom report:



Now the report gets properly initialized, and my custom report design is used to generate the check.

Related Posts

1 Comment

  1. Eugene Shamshurin

    Thank you for the walk-through, Tim! Great help to those who do check customization during implementation!

Submit a Comment

Your email address will not be published. Required fields are marked *

Upcoming Events


06oct10:00 am10:30 amPreview of D365 Business Central Fall Release Features and Functionality

06oct12:00 pm12:30 pmInsider's Guide to New Features Available in the Fall Release of D365 Finance and Supply Chain

07oct11:00 am12:00 pmConfab LIVE with Stoneridge - Dataverse and Dynamics in Review – Let’s Get Technical

13oct12:00 pm12:30 pmWave 2 Release – What’s Coming for Dynamics 365 Sales and Customer Service

21oct11:00 am12:00 pmConfab LIVE with Stoneridge - Dataverse and Dynamics in Review – Let’s Get Functional

26oct(oct 26)9:00 am28(oct 28)5:00 pmStoneridge Connect Leadership and Community Conference


04nov11:00 am12:00 pmConfab LIVE with Stoneridge - Challenging the Development Paradigm

About Stoneridge
Stoneridge Software is a unique Microsoft Gold Partner, with emphasis on partner. With specialties in Microsoft Dynamics 365, Microsoft Dynamics AX, Microsoft Dynamics NAV, Microsoft Dynamics GP and Microsoft Dynamics CRM, we focus on attracting the most knowledgeable experts in the field to our team, and prioritize delivering stellar solutions with maximum impact for your business. At Stoneridge, we are deeply committed to your results. Each engagement is met with a dedicated team, ready to provide thorough, tailored, and expert service. Based in Minnesota, we intentionally “step into your shoes,” wherever you are. We focus on what you care about, and develop trusting, long-term relationships with our clients.

Subscribe To Our Blog

Sign up to get periodic updates on the latest posts.

Thank you for subscribing!