Print Management Settings in Dynamics AX Seem to Disappear or Reset after a Code Move

by | Updated March 21, 2018 | Development, Dynamics 365 for Finance and Operations, Dynamics AX

A client recently reported that their customer overrides for Print Management in Dynamics AX had suddenly all reset to Screen. They used Print Management extensively to email Invoices to their customers. Having these emails suddenly “wiped out” was a critical issue for them.

In discussing the issue, it came to my attention that a recent code promotion to Production had occurred. I found that the SrsPrintDestinationSettings class had been modified, and the packed version had been changed from 1 to 2 as in the example below.

Print Management Settings

If you have not had to dig into the details of Print Management before, you may not be aware that when the settings are overridden in Print Management, such as adding an email for a customer invoice, the values packed in this class are actually stored in the PrintMgmtSettings.PrintJobSettings field in a container – EDT PrintJobSettingsPacked.

When the class was moved to production with the new version (2), users could no longer see the values stored previously as version 1. Those values were still in the container in the PrintJobSettings field, but they could not be accessed using version 2.

Let me give an example. We have modified customer 100023 to override the Destination setting for invoices. This modification was done prior to the class change when the packed version was 1.

Print Management Setup

You can use code similar to this in order to see what was packed via debugger…

Define a macro using the list defined in SrsPrintDestinationSettings. You will need most of the variables defined there also.

Write a select to find the record you are interested in…

 

Print settings

Since these values were stored as version 1, they will not show up once the class has changed to version 2. Now we will see something like this…

Print settings

There are a couple of ways to handle the problem:

1.  Try to avoid modifying framework classes to begin with. I understand that sometimes we have to go against our better judgment to accommodate our clients.

2.  When you change the packed version in any class, consider whether you should add a switch statement in the class to pull the previous version’s values from the field (or usage data) if they exist. Most of the time it is probably unnecessary since users don’t expect their usage data to be permanent. However, as in this issue, those values may be stored in a table. The code would look something like this…

3.  My client opted for updating the version directly in the PrintJobSettings field from 1 to 2. In this way, the previously entered values will magically appear again.

Here is some sample code to illustrate the update. Literals were used for clarity.

Note: The zero in the version 2 container was added for a new variable in version 2. You could just retrieve the record and call update() without changing anything since it would be saved as version 2 by default.

TaDa!

Print settings disappear

If your Print Management Settings in Dynamics AX  Disappear or Reset after a Code Move, I hope these tips can help you.

Related Posts

  • I had a customer ask me last week for some more information about print management, and because there's good information in multiple places, I thought it would be a good…

  • Microsoft Dynamics AX 2012 offers robust functionality designed to more effectively manage compensation across entire organizations.  Compensation is managed using compensation plans in combination with eligibility rules to restrict enrollment…

  • Over on the AX Support site on MSDN, Daniel Durrer has taken the time to keep tabs on the latest builds for Microsoft Dynamics AX 4.0, 2009 and 2012.  I…

0 Comments

Submit a Comment

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

Upcoming Events

october

07oct12:00 pm1:00 pmThe Three Paths to Business Central from Dynamics GP

08oct11:00 am12:00 pmConfab with Stoneridge - Livestream - The Vision and Strategy of Microsoft Business Systems

14oct10:00 am10:30 amThe Modern Manufacturer - Managing Complex Cost Modeling

14oct12:00 pm12:30 pmGenerating Custom Inspection or Process Forms

19octAll Day22Stoneridge Connect Fall 2020

22oct11:00 am12:00 pmConfab with Stoneridge - Livestream - Stoneridge Connect Recap

28oct10:00 am10:30 amThe Modern Manufacturer - Engineering Change Management: Introduction of NEW Functionality for Manufacturers Using Dynamics 365

november

11nov10:00 am10:30 amThe Modern Manufacturer - Tears and Trauma of MRP

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