Shawn Talbert
10/10/2024, 11:08 PMCeligo AI
10/10/2024, 11:08 PMAI generated answer (using internal Slack threads):The error "Provide a non-empty template file." typically occurs when the system is unable to locate the template file you're trying to use. Since you're using SDF and a custom email template that does not use the file cabinet (media item), you need to ensure that the template is correctly referenced in your code. In SuiteScript, you can load templates via script using
render.TemplateRenderer.setTemplateById()
or render.TemplateRenderer.setTemplateByScriptId()
. These methods allow you to set the template by its internal ID or script ID, respectively.
Here's an example of how you can use these methods:
javascript
var renderer = render.create();
renderer.setTemplateById(123); // replace 123 with your template's internal ID
or
javascript
var renderer = render.create();
renderer.setTemplateByScriptId('custom_script_id'); // replace 'custom_script_id' with your template's script ID
Ensure that the ID or script ID you're using is correct and that the template exists in your account. If the template is not found, you will encounter the "Provide a non-empty template file." error.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
10/10/2024, 11:08 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.807453334
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.806236804
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.804603517
Celigo AI
10/10/2024, 11:08 PM