2022.1

Table Of Contents
When a script calls this function in Preview mode, the script that triggers it is marked with an
error icon in the Scripts pane, and the given message is displayed in a hint.
When generating output from the Designer, the Designer will log the error and display an error
dialog with the given message. Content creation is aborted.
When generating output from Workflow, the entire job fails. Workflow will log the error and
execute any follow-up actions that are defined in the On Error tab of the respective OL Connect
Content Creation task (All in One, Create Email Content, Create Print Content, Create Preview
PDF, Create Web Content and Render Email Content). For more information about how to set
up follow-up actions, see Using the On Error tab in the Workflow Help.
Optimizing a template
This topic describes some ways to optimize a template in order to speed up the output process.
However, the template itself is not the only factor to be taken into account. The server
configuration and hardware configuration have an influence on the output speed as well. For
advice on server configuration and hardware configuration, see "Performance considerations"
on page26.
Scripts
In the process of output generation, the execution of scripts may take up more time than
necessary. Here's what you can do to shorten that time.
l Use efficient selectors. Using very precise selectors in scripts will be much faster than
using a text selector, especially on large documents. See "Use an ID or class as selector"
on page934.
l Optimize your scripts. Custom scripts with non-optimized loops and unnecessary DOM
manipulations can slow down Content Creation. Use the Designer's test facilities to find
out which scripts can be improved (see "Testing scripts" on page928 and "Optimizing
scripts" on page933).
l Only run the necessary scripts. Normally the Designer will run all scripts for each and
every record and section. You can save time in the process of Content Creation by
organizing scripts in folders and setting their execution scope or even disabling them (see
"Managing scripts" on page925). Note that loading a JavaScript library is generally very
fast and is only done once for the record set.
Page 1574