User specific printers in D365 for finance and operations
Finance and Operations applications use the Document Routing Agent to manage the spooling of documents to network printer devices.
While printing any document to printer using document routing agent , users see all the printers in their dropdown which are configured in DRA(Document routing agent). If you would like to know more about how to configure DRA for printing you can refer below link
In this blog post , I am going to show how you can customize finance and operation to show users their assigned printers while printing any report from finance and operations.
I added one button called “users” on the Network printers form.
You can navigate to this form from Organization administration > Set up > Network printers
When you click users button , you can see below form which has assigned users specific to printers .This new form is copy of users groups form which shows list of printers , all users and enabled users for a specific printer.
Once you select printer on the printers tab , users for that printers can be selected from enables users tab as shown below.
So in my scenario , I assigned printer 2 and Printer 3 to admin . So while printing report you can see from below screenshot , only printers associated with my user are available for me to print.
Once you create form which associates users with their printers , showing printers in the print dialog can be done by implementing delegate buildPrinterComboBox from class SRSPrintDestinationSettingsDelegates . Complete project can be downloaded from here.
public static class MySRSPrintDestinationSettingsHandlers { [SubscribesTo(classStr(SRSPrintDestinationSettingsDelegates), delegateStr(SRSPrintDestinationSettingsDelegates, buildPrinterComboBox))] public static void SRSPrintDestinationSettingsDelegates_buildPrinterComboBox(FormComboBoxControl deviceList) { NetPrinterUsers printerUsers; SysCorpNetActivePrinters activePrinters; deviceList.clear(); while select PrinterName from activePrinters exists join printerUsers where printerUsers.PrinterName == activePrinters.PrinterName && printerUsers.UserId == curUserId() { deviceList.add(activePrinters.PrinterName); } } }
Comments
-
Hi Kevin, You can select a user default printer in D365FO with Docentric: ax.docentric.com/.../ Here is more content related to printing capabilities from Dynamics: ax.docentric.com/.../ I hope this helps.
-
Hi Sukrut, this is a great solution as it is, but could this be modified to allow user self-service? i.e. a form on the 'User Options' screen where they could add printers to their own user account.
*This post is locked for comments