acuestajohnmark
06/03/2026, 9:08 AMCeligo AI
06/03/2026, 9:08 AMAI generated answer (using internal Slack threads):Based on the conversations, it appears that a User Event Script can indeed be triggered when printing a transaction. However, the changes made in the script may not be reflected in the printout. This is because the changes made in the
beforeLoad event of the User Event Script are not stored in the record.
One possible workaround suggested is to add a custom field to the record in the beforeLoad event that is not stored on the record but would be accessible in an advanced print template. This field could then be referenced in your printout.
Here is a code snippet provided in the conversation that demonstrates this:
BeforeLoad UserEvent only for PRINT
....
let jsonData = {
new_layout : 0,
hasJob: false,
hasTask: false,
hasEmpl: false........
jsonArray: jsonArray,
newRecord.setValue({
fieldId: 'custbody_rdata_inline_html',
value: JSON.stringify(jsonData)
});
And later in AdvancedPDF Template
<#assign my_json = record.custbody_rdata_inline_html?eval>
Please note that this is a workaround and may not work in all scenarios.
******
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
06/03/2026, 9:08 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.826293945
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.82598877
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.824035645
Celigo AI
06/03/2026, 9:08 AM