UI Builder Class Not Using the Same Contract as Controller and DP Classes in Dynamics AX 2012

by | Aug 9, 2019 | Dynamics AX

The other day I had to convert a custom query-based SSRS report within Dynamics AX 2012 into a regular report so that we could run the report from a different form (ProdTable & ProdTableListPage) and have certain values auto-populate the query prompt. Normally something like this would be easy to implement, however, I ran into some issues when making the modifications.

I created the data provider, Contract and Controller classes, and the dialog values were not changing. I ended up building a UI Builder class as well to counteract this issue. I had the logic to pre-populate the contract in the controller class by using the record that was highlighted, and I verified that the values were being pulled into the contract class as desired. I then stumbled across the issue of the UI Builder class was not using the same contract instance as the Controller & Data Provider classes. This was resulting in the values not populating the prompt and was not being passed to the Data Provider class. What I wound up having to do is to move my logic into the UI Builder class. Below I have provided the code I created in order to utilize this.

Controller main method:

The rest of the logic had to be put into the UI Builder class, specifically the build method.

This code was able to solve the issue I was having and should help you if you’re facing the same problems. Learn more tips for Dynamics AX 2012 by subscribing to our blog. If you have any questions in the meantime, please reach out to the experts at Stoneridge Software.

Related Posts

0 Comments

Submit a Comment

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

Upcoming Events

july

16jul11:00 am12:00 pmConfab with Stoneridge - Livestream - Business Intelligence Power Hour

22jul10:00 am10:30 amOn the Job with Dynamics 365 - Manufacturing Material Handler

22jul12:00 pm1:00 pmImprove Field Service Delivery and Increase Customer Satisfaction

30jul11:00 am12:00 pmConfab with Stoneridge - Livestream - Power Apps Power Hour

august

03aug(aug 3)8:00 am07(aug 7)5:00 pmMicrosoft Dynamics GP Core Financials Bootcamp

05aug10:00 am10:30 amOn the Job with Dynamics 365 - Manufacturing Shipping / Receiving Department

05aug12:00 pm1:00 pmHow Ag Retailers Can Simplify Processing Equity Payments using Levridge

12aug10:00 am10:30 amWhy Levridge Grain? How to Achieve Efficient and Accurate Scale Tickets

12aug12:00 pm1:00 pmThe Three Paths to Dynamics 365 Finance and Supply Chain from Dynamics AX

13aug11:00 am12:00 pmConfab with Stoneridge - Livestream - Dynamics 365 2020 Wave 2 Preview

19aug10:00 am11:00 amWhat is Levridge? An Overview of the Ultimate Ag Solution

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!

X