Anyone experienced an issue where when printing a ...
# advancedpdf
j
Anyone experienced an issue where when printing a Long Text field on Advanced PDF/HTML template it cuts off everything past 1000 characters?
Use Case: We have a list of custom records A showing on a custom record B. Transactions have a single select of type B on them. I want to show a text summary of the As on my transaction in Advanced PDF/HTML template. I know I won’t be able to directly access the sublist via Advanced PDF/HTML template, so to achieve this, I created a custom field on B of type Long Text that updates itself whenever something on the sublist changes. Then, I display this field on my transaction template.
d
found the same issue here , answer was 'file a support case'
wonder if you could
<#list record.longtextfield?split('<br />') as text>${text}<br /></#list>
*edited to use <br /> instead of \n
(if the list of custom record A's are separated by newlines in the long text field)
s
I seem to recall this being a known limitation. The likely workaround would be to, create 2 or more fields, text_summary1, text_summary2,
and having the code updating the current text summary split it every thousand characters, and save it in the corresponding field
though, perhaps formula fields returning characters 1001-2000, 2001-3000, etc. would also work, and probably worth trying first
👀 1
j
we can’t predict how long the text will be, so don’t have a solid way to know how many fields we’d need
n
Depending on when / where you are printing this... You could dynamically create custpage_ fields containing 1,000 characters each. If you also dynamically added a custpage_ field with a count of how many you have and keep your field names sequentials. In your template pick up the count and then you know how many custpage_ fields to pick up. which you could do in a loop and concat the fields. custpage_text_1 custpage_text_2 etc etc
j
The problem I’ve had is that UE scripts that are supposed to execute on
print
don’t execute when the transaction PDF is attached to the email automatically.
n
The context of "print" I thought was only when the user specifically pressed print, but happy to be proven wrong.
j
the UE doesn’t get called at all as far as I can tell when you are using the
INCLUDE TRANSACTION
checkbox.
NS Support offered a workaround. Apparently it only truncates if the field is on a subrecord. So I made a non-stored version of the field on the transaction itself, and sourced it from the child record. That seems to be working. Stupid that it’s necessary.
👀 1
slack bookmark 1
d
wonder if that's documented anywhere....
j
lol
unlikely
💯 1