This is a simple job that shows you how to get/set printer settings in AX 2012. In AX 2009, I used things like PrintJobSettings and SysPrintForm where in AX 2012 you use SRSPrintDestinationSettings which uses SysOperationsTemplateForm.
This is just a "Hello World" if you will for modifying theprint settings in AX 2012 and I'll be posting a follow up with a slightly more advanced example.
This is just a "Hello World" if you will for modifying the
static void GetPrinterSettingsAX2012Simple(Args _args) { SRSPrintDestinationSettings printSettings = new SRSPrintDestinationSettings(); SRSPrintDestinationSettingsContainer printerNameDestination; // This sets what the user will see defaulted printSettings.printMediumType(SRSPrintMediumType::Printer); if (SrsReportRunUtil::showSettingsDialog(printSettings)) { printerNameDestination = SrsReportRunUtil::getPrinterNameDestination(printSettings); if (printerNameDestination != conNull()) { info(strFmt("Printer Name: %1", conPeek(printerNameDestination, 1))); info(strFmt("Printer Destination: %1", conPeek(printerNameDestination, 2))); } } else info("User clicked cancel"); }