Monday, 24 March 2014

ShowListOfPrinters in ax 2009

static void ShowListOfPrinters(Args _args)
{
    printJobSettings printJobSettings;
    sysPrintOptions sysPrintOptions;
    map printerMap;
    mapIterator mapIterator;
    ;
    printJobSettings =
    SysPrintOptions::newPrintJobSettingsOnServer();
    sysPrintOptions = new sysPrintOptions();
    sysPrintOptions.setPrintJobSettings(printJobSettings);
    sysPrintOptions.buildPrinterMap();
    printerMap = sysPrintOptions.getPrinterMap();
    mapIterator = new mapIterator(printerMap);
    mapIterator.begin();
    while (mapIterator.more())
    {
        info(mapIterator.value());
        mapIterator.next();
    }
}

No comments:

Post a Comment