X++ Find SSRS print management setting for selected customer and report

static void VNPrintMgmtDoc(Args _args)
{
    PrintMgmtDocInstance    printMgmtDocInstance;
    CustTable                         custTable;
    PrintJobSettings               printJobSettings;
    PrintMgmtSettings           printMgmtSettings;
    SRSPrintDestinationSettings srsPrintDestinationSettings;

    custTable = CustTable::find("ABC");

    printMgmtDocInstance = PrintMgmtDocInstance::findByPrintType(custTable.RecId,custTable.TableId,PrintMgmtNodeType::CustTable,PrintMgmtDocumentType::SalesOrderInvoice,PrintMgmtDocInstanceType::Original,false);

    select printMgmtSettings where printMgmtSettings.ParentId == printMgmtDocInstance.RecId;

    srsPrintDestinationSettings = new SRSPrintDestinationSettings(printMgmtSettings.PrintJobSettings);

    info(strFmt("%1",srsPrintDestinationSettings.fileFormat()));
    info(strFmt("%1",srsPrintDestinationSettings.emailTo()));
    info(strFmt("%1",srsPrintDestinationSettings.emailAttachmentFileFormat()));   
   
}


Comments

Popular posts from this blog

AX 2012 DEVOPS Build, Release setup and configuration

AX 2012 Build process using AZURE DEVOPS

What is Microsoft Power Platform?