Announcements
No record found.
static void ExpBatchJobPrintDestinationSettingsMail(Args _args) { //Job data Batch batchTable; BatchParameters batchParameters; container innerCon, conEmailTo, conEmailCC, conEmailSubject, conEmailBcc, conEmailReplyTo; //For export file TextIo exportFile; FileName exportFileName; int counter = 0; #File #define.CRLF("\r\n") //Prepare export csv exportFileName = @"\\yourPath\"; //File path exportFile = new TextIo(exportFileName, #io_write); exportFile.outFieldDelimiter(';'); exportFile.outRecordDelimiter(#CRLF); //Write header exportFile.write("emailSubject;emailTo;emailCC;emailBcc;emailReplyTo"); //Job while select batchTable where batchTable.Caption LIKE "D*" //Query as you need { counter++; //Reset containers, just to make sure we dont export data from the last record batchParameters = conNull(); innerCon = conNull(); conEmailTo = conNull(); conEmailCC = conNull(); conEmailSubject = conNull(); conEmailBcc = conNull(); conEmailReplyTo = conNull(); //Iterate batchParameters containers. NOTE: the 2nd parameters (integers) 'where to peek' may differ, depending on custom fields batchParameters=batchTable.Parameters; innerCon = conPeek(batchParameters, 5); innerCon = conPeek(innerCon, 7); innerCon = conPeek(innerCon, 2); innerCon = conPeek(innerCon, 2); //DataContractMap innerCon = conPeek(innerCon, 6); //SRSPrintDestinationSettings conEmailTo = conPeek(innerCon, 7); conEmailCC = conPeek(innerCon, 5); conEmailSubject = conPeek(innerCon, 6); conEmailBcc = conPeek(innerCon, 12); //Custom field conEmailReplyTo = conPeek(innerCon, 13); //Custom field exportFile.write(strFmt("%1;%2;%3;%4;%5", conPeek(conEmailSubject, 2), conPeek(conEmailTo, 2), conPeek(conEmailCC, 2), conPeek(conEmailBcc, 2), conPeek(conEmailReplyTo, 2))); } info(strFmt("Exported %1 records", counter)); }
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 430 Most Valuable Professional
CU10121822-0 368
André Arnaud de Cal... 364 Super User 2026 Season 2