Hello ! Many thanks that works for me. I needed to list every customer with ASCII format in format type for the email : static void CUSTOMERINVOICEASCII(Args _args) { CustTable CustTable; printMgmtDocInstance printMgmtDocInstance; PrintJobSettings PrintJobSettings; PrintMgmtSettings PrintMgmtSettings; PrintFormat format; while select accountNum, name from custTable { while select DocumentType from printMgmtDocInstance join PrintJobSettings from printMgmtSettings where custTable.RecId == printMgmtDocInstance.ReferencedRecId && printMgmtDocInstance.RecId == printMgmtSettings.ParentId { printJobSettings = new PrintJobSettings(printMgmtSettings.PrintJobSettings); if ( printJobSettings.format() == PrintFormat::ASCII) { info(strfmt('%1',custTable.AccountNum)); } } } }
↧