Add the Back (Close) and Save Buttons to Print Management Setup

As D365FO Reporting and Print management experts, we’ve frequently been asked - where is, for goodness’ sake, the Close button (which became the Back button in the meantime 😀) on the Print management setup form. We also saw the feature request on Dynamics 365 Application Ideas, so we decided: it’s time to take some action 😎.

How to add the Back/Close button

This is a very simply solution – extend the PrintMgmtSetupUIMain form and add an Action Pane. The Back button (ex the Close button) will appear automatically. There is additional work though: we need to hide all other non-applicable System buttons such as New, Delete, Options, Attachments, etc. which will also appear automatically, like the Back button.

Check the code how to hide all other buttons or download the resources:

How to add the Save button

Adding the Save button is a bit more complicated than adding the Back button. The Save button gets already visible when we add the Action Pane. However, we also need:

(1) To make the form always editable in order to prevent switching between the Save and Edit buttons.
This can be done in the following way:

(2) To create a method that actually saves the changes made in the setup.
Essentially, we need to use the existing saving mechanism as it is done in the base form PrintMgmtSetupUIMain:

Where ctrl is an instance of the controller class PrintMgmtSetupUICtrl, used for building up the Print management setup form and handling all the actions such as adding new Print management settings, configuring and deleting them.

In order to invoke the above method, we subscribed to the Saving delegate, exposed via FormRun.dataHelper(), an instance of the FormRunDataHelper class.

Alternatively, we could use the registerOverrideMethod() method for the Save button since we can read its Control ID from the SysSystemDefinedButtons macro – as we did for other System buttons in order to hide them.

There is more

To the Print management setup form we also added:

  • The Open in new window button,
  • Current company, e.g. Print management setup (USMF),
  • Link to an article explaining Print management setup,
  • Link to Print management utilities, which offers a tabular view of all Print management settings in the system including overrides, advanced filtering, search and validation, bulk update and delete.

Additionally, we placed all Print management setups for all modules in the Docentric AX workspace (check the article) and enable tracing of loading and resolving Print management settings (check the article).

We also created Print management preview on common journals (check the article) and Print Management Data Entity for moving Print management settings between companies and environments (check the article).

We blogged a lot on Print management too 😀

The following articles explain Print management setup in great detail:

Check also our other articles on Print management setup >>


Download Docentric AX Free Edition >>

NOTE: The Back and Save buttons added to Print management setup will be delivered as a feature in Docentric AX Free Edition version 3.4.8 so until then please feel free to use the code parts from these D365FO artifacts 👍


Leave a Reply

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


Docentric respects your privacy. Learn how your comment data is processed >>

Docentric respects your privacy. Learn how your comment data is processed >>