Watz
10/20/2022, 6:07 PMSciuridae54696d
10/20/2022, 6:11 PMWatz
10/20/2022, 6:12 PMSciuridae54696d
10/20/2022, 6:16 PMcreece
10/20/2022, 6:19 PMWatz
10/20/2022, 6:19 PMWatz
10/20/2022, 6:21 PMWatz
10/20/2022, 6:24 PMcreece
10/20/2022, 6:24 PMWatz
10/20/2022, 6:24 PMWatz
10/20/2022, 6:24 PMSciuridae54696d
10/20/2022, 6:26 PMWatz
10/20/2022, 6:26 PMWatz
10/20/2022, 6:28 PMWatz
10/20/2022, 6:28 PMWatz
10/20/2022, 6:33 PMconst queryResults = query.runSuiteQL({
query: mainQuery
}).asMappedResults()
const emails = query.runSuiteQL({
query: `SELECT DISTINCT assigned_to_email FROM ${mainQuery}`
}).asMappedResults()
const renderer = render.create()
renderer.templateContent = template
renderer.addCustomDataSource({
format: render.DataSource.OBJECT,
alias: 'data',
data: {
rows: queryResults
}
})
const body = renderer.renderAsString()
email.sendBulk({
author: 1,
body,
recipients: 1,
subject: 'test reminder',
bcc: emails.map(email => email.assigned_to_email),
})
scottvonduhn
10/20/2022, 6:44 PMWatz
10/20/2022, 6:44 PMWatz
10/20/2022, 6:47 PMscottvonduhn
10/20/2022, 6:48 PMWatz
10/20/2022, 6:49 PMscottvonduhn
10/20/2022, 6:50 PMWatz
10/20/2022, 6:52 PMscottvonduhn
10/20/2022, 6:52 PMscottvonduhn
10/20/2022, 6:53 PMWatz
10/20/2022, 6:53 PMWatz
10/20/2022, 6:53 PMscottvonduhn
10/20/2022, 6:53 PMscottvonduhn
10/20/2022, 6:54 PM